From 8b2ac2075361b6322191dc594fe64efdcb637b61 Mon Sep 17 00:00:00 2001 From: Gabe Black Date: Sun, 19 Apr 2009 03:56:57 -0700 Subject: X86: Keep track of what the initial count value was in the LAPIC timer. --- src/dev/intel_8254_timer.hh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (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 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); -- cgit v1.2.3