Hi Anders, No clue. It looks like Nilay last edited that code 3 months ago. So maybe he can shed some light on it. Is the problem reproducible in the checkpoints?
tickEvent is scheduled when the device is created and isn't ever de-scheduled, so it should always have a positive value. _when is positive in the checkpoint, correct? because it's rescheduled for curTIck() + _when which would then always be positive. We certainly shouldn't be saving a negative tick value in the checkpoint file and I'm a little confused as to why we bother subtracting curTick in the serialize() method and adding it back in the unserialize(). Just leaving it alone should be good enough. Thanks, Ali On Jan 19, 2012, at 4:51 AM, Anders Handler wrote: > Hi, > > When I create a checkpoint I get a negative value stored in > rtcClockTickOffset, which will make Gem5 crash when restoring the checkpoint, > complaining that an event cannot be scheduled in the past. > > The failure is that the "RTCEvent event" holds an old tick value (_when) > which I think it should not. The code is in: > src/dev/mc146818.hh > src/dev/mc146818.cc > > The workaround I am using is manually removing the "-" from the > rtcClockTickOffset variable in the checkpoint file (m5.cpt). > > I run x86. > > Anyone has a clue how to fix? > > Best regards > Anders > _______________________________________________ > gem5-users mailing list > gem5-users@gem5.org > http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users _______________________________________________ gem5-users mailing list gem5-users@gem5.org http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users