summaryrefslogtreecommitdiff
path: root/src/dev/mc146818.hh
diff options
context:
space:
mode:
authorBrad Beckmann <Brad.Beckmann@amd.com>2010-08-20 11:46:13 -0700
committerBrad Beckmann <Brad.Beckmann@amd.com>2010-08-20 11:46:13 -0700
commit283be34a992401f07d62e274d501c4185fca8377 (patch)
tree14b04337496b5addb3d65a0eef627709fd954150 /src/dev/mc146818.hh
parentb6d08e0455a9256a157d683eb31c7af541c30ce9 (diff)
downloadgem5-283be34a992401f07d62e274d501c4185fca8377.tar.xz
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.
Diffstat (limited to 'src/dev/mc146818.hh')
-rw-r--r--src/dev/mc146818.hh6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/dev/mc146818.hh b/src/dev/mc146818.hh
index 699785199..507abab5a 100644
--- a/src/dev/mc146818.hh
+++ b/src/dev/mc146818.hh
@@ -119,6 +119,10 @@ class MC146818 : public EventManager
/** RTC status register B */
uint8_t stat_regB;
+ /** RTC event times for drain and serialization coordination */
+ Tick rtcTimerInterruptTickOffset;
+ Tick rtcClockTickOffset;
+
public:
MC146818(EventManager *em, const std::string &name, const struct tm time,
bool bcd, Tick frequency);
@@ -132,6 +136,8 @@ class MC146818 : public EventManager
void tickClock();
+ unsigned int drain(Event *de);
+
/**
* Serialize this object to the given output stream.
* @param base The base name of the counter object.