diff options
author | Brad Beckmann <Brad.Beckmann@amd.com> | 2010-08-20 11:46:13 -0700 |
---|---|---|
committer | Brad Beckmann <Brad.Beckmann@amd.com> | 2010-08-20 11:46:13 -0700 |
commit | 283be34a992401f07d62e274d501c4185fca8377 (patch) | |
tree | 14b04337496b5addb3d65a0eef627709fd954150 /src/dev/alpha/tsunami_io.cc | |
parent | b6d08e0455a9256a157d683eb31c7af541c30ce9 (diff) | |
download | gem5-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/alpha/tsunami_io.cc')
-rw-r--r-- | src/dev/alpha/tsunami_io.cc | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/dev/alpha/tsunami_io.cc b/src/dev/alpha/tsunami_io.cc index c90f06b5a..1a76c2c32 100644 --- a/src/dev/alpha/tsunami_io.cc +++ b/src/dev/alpha/tsunami_io.cc @@ -249,6 +249,17 @@ TsunamiIO::clearPIC(uint8_t bitvector) } } +unsigned int +TsunamiIO::drain(Event *de) +{ + unsigned int count = 0; + count += pitimer.drain(de); + count += rtc.drain(de); + assert(count == 0); + changeState(SimObject::Drained); + return count; +} + void TsunamiIO::serialize(ostream &os) { |