summaryrefslogtreecommitdiff
path: root/src/dev/x86/cmos.hh
diff options
context:
space:
mode:
authorGabe Black <gblack@eecs.umich.edu>2008-10-11 01:31:32 -0700
committerGabe Black <gblack@eecs.umich.edu>2008-10-11 01:31:32 -0700
commit8c532d629732e93fa23a38328b653eb4c2314936 (patch)
tree99b731ecb4beba3f6db44f54c24bcb50041baf20 /src/dev/x86/cmos.hh
parentcf9afbba510ceac86e011a4b37ec848cd7f7a6ed (diff)
downloadgem5-8c532d629732e93fa23a38328b653eb4c2314936.tar.xz
X86: Hook the CMOS device to the I8259 PICs.
Diffstat (limited to 'src/dev/x86/cmos.hh')
-rw-r--r--src/dev/x86/cmos.hh18
1 files changed, 11 insertions, 7 deletions
diff --git a/src/dev/x86/cmos.hh b/src/dev/x86/cmos.hh
index 04df9dd04..337fb8b02 100644
--- a/src/dev/x86/cmos.hh
+++ b/src/dev/x86/cmos.hh
@@ -38,6 +38,8 @@
namespace X86ISA
{
+class I8259;
+
class Cmos : public BasicPioDevice
{
protected:
@@ -54,24 +56,26 @@ class Cmos : public BasicPioDevice
class X86RTC : public MC146818
{
+ protected:
+ I8259 * i8259;
+ int intLine;
public:
X86RTC(EventManager *em, const std::string &n, const struct tm time,
- bool bcd, Tick frequency) :
- MC146818(em, n, time, bcd, frequency)
+ bool bcd, Tick frequency, I8259 *_i8259, int _intLine) :
+ MC146818(em, n, time, bcd, frequency),
+ i8259(_i8259), intLine(_intLine)
{
}
protected:
- void handleEvent()
- {
- return;
- }
+ void handleEvent();
} rtc;
public:
typedef CmosParams Params;
Cmos(const Params *p) : BasicPioDevice(p), latency(p->pio_latency),
- rtc(this, "rtc", p->time, true, ULL(5000000000))
+ rtc(this, "rtc", p->time, true, ULL(5000000000),
+ p->i8259, p->int_line)
{
pioSize = 2;
memset(regs, 0, numRegs * sizeof(uint8_t));