diff options
author | Gabe Black <gblack@eecs.umich.edu> | 2009-04-19 03:56:57 -0700 |
---|---|---|
committer | Gabe Black <gblack@eecs.umich.edu> | 2009-04-19 03:56:57 -0700 |
commit | 8b2ac2075361b6322191dc594fe64efdcb637b61 (patch) | |
tree | be474bbe9d3110b39285dcf308f65d7579510146 /src/dev/intel_8254_timer.hh | |
parent | 18b38631274aa6197cb637f2e69d765dd24c8cf3 (diff) | |
download | gem5-8b2ac2075361b6322191dc594fe64efdcb637b61.tar.xz |
X86: Keep track of what the initial count value was in the LAPIC timer.
Diffstat (limited to 'src/dev/intel_8254_timer.hh')
-rw-r--r-- | src/dev/intel_8254_timer.hh | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/dev/intel_8254_timer.hh b/src/dev/intel_8254_timer.hh index bb650d33b..1bc2ab87b 100644 --- a/src/dev/intel_8254_timer.hh +++ b/src/dev/intel_8254_timer.hh @@ -98,6 +98,8 @@ class Intel8254Timer : public EventManager friend class Counter; void setTo(int clocks); + + int clocksLeft(); }; private: @@ -108,8 +110,8 @@ class Intel8254Timer : public EventManager CounterEvent event; - /** Current count value */ - uint16_t count; + /** Initial count value */ + uint16_t initial_count; /** Latched count */ uint16_t latched_count; @@ -141,6 +143,9 @@ class Intel8254Timer : public EventManager /** Latch the current count (if one is not already latched) */ void latchCount(); + /** Get the current count for this counter */ + int currentCount(); + /** Set the read/write mode */ void setRW(int rw_val); |