From 283be34a992401f07d62e274d501c4185fca8377 Mon Sep 17 00:00:00 2001 From: Brad Beckmann Date: Fri, 20 Aug 2010 11:46:13 -0700 Subject: devices: Fixed periodic interrupts to work with draining Added drain functions to the RTC and 8254 timer so that periodic interrupts stop when the system is draining. This patch is needed to checkpoint in timing mode. Otherwise under certain situations, the event queue will never be completely empty. --- src/dev/intel_8254_timer.hh | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/dev/intel_8254_timer.hh') diff --git a/src/dev/intel_8254_timer.hh b/src/dev/intel_8254_timer.hh index 30ddc7bca..26ea0687e 100644 --- a/src/dev/intel_8254_timer.hh +++ b/src/dev/intel_8254_timer.hh @@ -137,6 +137,10 @@ class Intel8254Timer : public EventManager /** Pointer to container */ Intel8254Timer *parent; + /** if non-zero, the scheduled tick of an event used for drain + serialization coordination */ + Tick event_tick; + public: Counter(Intel8254Timer *p, const std::string &name, unsigned int num); @@ -164,6 +168,12 @@ class Intel8254Timer : public EventManager /** Is the output high? */ bool outputHigh(); + /** + * Drain all associated events. + * @param drainEvent + */ + unsigned int drain(Event *de); + /** * Serialize this object to the given output stream. * @param base The base name of the counter object. @@ -229,6 +239,8 @@ class Intel8254Timer : public EventManager return counter[num]->outputHigh(); } + unsigned int drain(Event *de); + /** * Serialize this object to the given output stream. * @param base The base name of the counter object. -- cgit v1.2.3