summaryrefslogtreecommitdiff
path: root/src/dev/x86/i8259.cc
diff options
context:
space:
mode:
authorGabe Black <gblack@eecs.umich.edu>2008-10-11 01:45:25 -0700
committerGabe Black <gblack@eecs.umich.edu>2008-10-11 01:45:25 -0700
commit539563e04b4925e88c28cb44f5180915c3b3a5be (patch)
treede3c6c045eff66c6ba6e5f29589bb20c7c3e9ad1 /src/dev/x86/i8259.cc
parent119e127d7128edfb729101b92ca160c1f01391ca (diff)
downloadgem5-539563e04b4925e88c28cb44f5180915c3b3a5be.tar.xz
X86: Make the CMOS and I8259 devices use IntDev and IntPin.
Diffstat (limited to 'src/dev/x86/i8259.cc')
-rw-r--r--src/dev/x86/i8259.cc13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/dev/x86/i8259.cc b/src/dev/x86/i8259.cc
index 2dd6caaff..dbc8ab768 100644
--- a/src/dev/x86/i8259.cc
+++ b/src/dev/x86/i8259.cc
@@ -139,7 +139,7 @@ X86ISA::I8259::write(PacketPtr pkt)
break;
case 0x2:
DPRINTF(I8259, "Received initialization command word 3.\n");
- if (master == NULL) {
+ if (mode == Enums::I8259Master) {
DPRINTF(I8259, "Slaves attached to IRQs:%s%s%s%s%s%s%s%s\n",
bits(val, 0) ? " 0" : "",
bits(val, 1) ? " 1" : "",
@@ -192,9 +192,14 @@ X86ISA::I8259::signalInterrupt(int line)
fatal("Line number %d doesn't exist. The max is 7.\n");
if (bits(IMR, line)) {
DPRINTF(I8259, "Interrupt %d was masked.\n", line);
- } else if (master != NULL) {
- DPRINTF(I8259, "Propogating interrupt to master.\n");
- master->signalInterrupt(cascadeBits);
+ } else {
+ if (output) {
+ DPRINTF(I8259, "Propogating interrupt.\n");
+ output->signalInterrupt();
+ } else {
+ warn("Received interrupt but didn't have "
+ "anyone to tell about it.\n");
+ }
}
}