Matthew Poremba has uploaded this change for review. (
https://gem5-review.googlesource.com/c/public/gem5/+/66731?usp=email )
Change subject: dev: Ignore MC146818 UIP bit / Fix x86 Linux 5.11+ boot
......................................................................
dev: Ignore MC146818 UIP bit / Fix x86 Linux 5.11+ boot
As of Linux 5.11, the MC146818 code was changed to avoid reading garbage
data that may occur if the is a read while the registers are being
updated:
github.com/torvalds/linux/commit/05a0302c35481e9b47fb90ba40922b0a4cae40d8
Previously toggling this bit was fine as Linux would check twice. It now
checks before and after reading time information, causing it to retry
infinitely until eventually Linux bootup fails due to watchdog timeout.
This changeset always sets update in progress to false. Since this is a
simulation, the updates probably will not be occurring at the same time
a read is occurring.
Change-Id: If0f440de9f9a6bc5a773fc935d1d5af5b98a9a4b
---
M src/dev/mc146818.cc
1 file changed, 26 insertions(+), 2 deletions(-)
diff --git a/src/dev/mc146818.cc b/src/dev/mc146818.cc
index 919efb0..2bfe877 100644
--- a/src/dev/mc146818.cc
+++ b/src/dev/mc146818.cc
@@ -233,8 +233,9 @@
else {
switch (addr) {
case RTC_STAT_REGA:
- // toggle UIP bit for linux
- stat_regA.uip = !stat_regA.uip;
+ // Linux after v5.10 checks this multiple times so toggling
+ // leads to a deadlock on bootup.
+ stat_regA.uip = 0;
return stat_regA;
break;
case RTC_STAT_REGB:
--
To view, visit
https://gem5-review.googlesource.com/c/public/gem5/+/66731?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gem5-review.googlesource.com/settings
Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: If0f440de9f9a6bc5a773fc935d1d5af5b98a9a4b
Gerrit-Change-Number: 66731
Gerrit-PatchSet: 1
Gerrit-Owner: Matthew Poremba <matthew.pore...@amd.com>
Gerrit-MessageType: newchange
_______________________________________________
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org