From: Nikos Nikoleris Date: Fri, 3 Apr 2015 16:42:10 +0000 (-0500) Subject: dev: (un)serialize fix for the RTC and RTC Timer Interrupt events X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=4bdbdd84136d75272cb1df6444746c8ff669893e;p=gem5.git 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 --- 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