summaryrefslogtreecommitdiff
path: root/src/dev/intel_8254_timer.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/intel_8254_timer.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/intel_8254_timer.hh')
-rw-r--r--src/dev/intel_8254_timer.hh12
1 files changed, 12 insertions, 0 deletions
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);
@@ -165,6 +169,12 @@ class Intel8254Timer : public EventManager
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.
* @param os The stream to serialize to.
@@ -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.