diff options
author | Nikos Nikoleris <nikos.nikoleris@gmail.com> | 2015-04-03 11:42:10 -0500 |
---|---|---|
committer | Nikos Nikoleris <nikos.nikoleris@gmail.com> | 2015-04-03 11:42:10 -0500 |
commit | 4bdbdd84136d75272cb1df6444746c8ff669893e (patch) | |
tree | e6264d7b3badb98e5a1d1899475d2c560b91e600 /src | |
parent | bebab7f24f9bbc661ae7f33c7a3f2f7785e6b088 (diff) | |
download | gem5-4bdbdd84136d75272cb1df6444746c8ff669893e.tar.xz |
dev: (un)serialize fix for the RTC and RTC Timer Interrupt events
Restoring from a checkpoint fails if either the RTC or the RTC Timer
Interrrupt event is disabled. The restored machine tried incorrectly
to schedule the next event with negative offset.
Committed by: Nilay Vaish <nilay@cs.wisc.edu>
Diffstat (limited to 'src')
-rw-r--r-- | src/dev/mc146818.cc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/dev/mc146818.cc b/src/dev/mc146818.cc index fa8350760..b5467f8cc 100644 --- a/src/dev/mc146818.cc +++ b/src/dev/mc146818.cc @@ -127,8 +127,11 @@ MC146818::startup() { assert(!event.scheduled()); assert(!tickEvent.scheduled()); - schedule(event, curTick() + event.offset); - schedule(tickEvent, curTick() + tickEvent.offset); + + if (stat_regB.pie) + schedule(event, curTick() + event.offset); + if (!rega_dv_disabled(stat_regA)) + schedule(tickEvent, curTick() + tickEvent.offset); } void |