summaryrefslogtreecommitdiff
path: root/src/dev/x86/i8254.hh
diff options
context:
space:
mode:
authorGabe Black <gblack@eecs.umich.edu>2008-10-11 15:15:34 -0700
committerGabe Black <gblack@eecs.umich.edu>2008-10-11 15:15:34 -0700
commita2599e4fc1272e4c1fdf5cff90da88653579b62f (patch)
tree6ed886dbd3ccd1608b3f6fdbc37db266511d5f47 /src/dev/x86/i8254.hh
parent526933e5d03f5d7963bc5a244294ddbb068c4770 (diff)
downloadgem5-a2599e4fc1272e4c1fdf5cff90da88653579b62f.tar.xz
X86: Set up a mechanism for the I8254 timer to cause interrupts.
Diffstat (limited to 'src/dev/x86/i8254.hh')
-rw-r--r--src/dev/x86/i8254.hh24
1 files changed, 22 insertions, 2 deletions
diff --git a/src/dev/x86/i8254.hh b/src/dev/x86/i8254.hh
index 9528013c8..e6860b2c4 100644
--- a/src/dev/x86/i8254.hh
+++ b/src/dev/x86/i8254.hh
@@ -44,9 +44,29 @@ class I8254 : public BasicPioDevice
{
protected:
Tick latency;
- Intel8254Timer pit;
+ class X86Intel8254Timer : public Intel8254Timer
+ {
+ protected:
+ I8254 * parent;
+
+ void
+ counterInterrupt(unsigned int num)
+ {
+ parent->counterInterrupt(num);
+ }
+
+ public:
+ X86Intel8254Timer(const std::string &name, I8254 * _parent) :
+ Intel8254Timer(_parent, name), parent(_parent)
+ {}
+ };
+
+
+ X86Intel8254Timer pit;
IntPin *intPin;
+
+ void counterInterrupt(unsigned int num);
public:
typedef I8254Params Params;
@@ -58,7 +78,7 @@ class I8254 : public BasicPioDevice
}
I8254(Params *p) : BasicPioDevice(p), latency(p->pio_latency),
- pit(this, p->name), intPin(p->int_pin)
+ pit(p->name, this), intPin(p->int_pin)
{
pioSize = 4;
}