diff options
author | cdirik <cdirik@micron.com> | 2015-01-06 15:10:22 -0700 |
---|---|---|
committer | cdirik <cdirik@micron.com> | 2015-01-06 15:10:22 -0700 |
commit | 1693e526d090f47323e378f0bd8546f28c2a97f7 (patch) | |
tree | bf026901c1b0fd644cef546fc1d69e252a46e789 /src/dev/intel_8254_timer.hh | |
parent | 1c1fb2c9886134c5ab4a877e2ac5baae8c2390a9 (diff) | |
download | gem5-1693e526d090f47323e378f0bd8546f28c2a97f7.tar.xz |
dev: prevent intel 8254 timer counter events firing before startup
This change includes edits to Intel8254Timer to prevent counter events firing
before startup to comply with SimObject initialization call sequence.
Committed by: Nilay Vaish <nilay@cs.wisc.edu>
Diffstat (limited to 'src/dev/intel_8254_timer.hh')
-rw-r--r-- | src/dev/intel_8254_timer.hh | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/dev/intel_8254_timer.hh b/src/dev/intel_8254_timer.hh index ad751447e..b2fd949f2 100644 --- a/src/dev/intel_8254_timer.hh +++ b/src/dev/intel_8254_timer.hh @@ -102,6 +102,8 @@ class Intel8254Timer : public EventManager void setTo(int clocks); int clocksLeft(); + + Tick getInterval(); }; private: @@ -112,6 +114,9 @@ class Intel8254Timer : public EventManager CounterEvent event; + /** True after startup is called. */ + bool running; + /** Initial count value */ uint16_t initial_count; @@ -121,6 +126,9 @@ class Intel8254Timer : public EventManager /** Interrupt period */ uint16_t period; + /** When to start ticking */ + Tick offset; + /** Current mode of operation */ uint8_t mode; @@ -181,6 +189,9 @@ class Intel8254Timer : public EventManager */ void unserialize(const std::string &base, Checkpoint *cp, const std::string §ion); + + /** Start ticking */ + void startup(); }; protected: @@ -246,6 +257,9 @@ class Intel8254Timer : public EventManager */ void unserialize(const std::string &base, Checkpoint *cp, const std::string §ion); + + /** Start ticking */ + void startup(); }; #endif // __DEV_8254_HH__ |