summaryrefslogtreecommitdiff
path: root/src/dev/x86
diff options
context:
space:
mode:
Diffstat (limited to 'src/dev/x86')
-rw-r--r--src/dev/x86/i8259.cc3
-rw-r--r--src/dev/x86/i8259.hh5
2 files changed, 6 insertions, 2 deletions
diff --git a/src/dev/x86/i8259.cc b/src/dev/x86/i8259.cc
index dbc8ab768..a67baa8e2 100644
--- a/src/dev/x86/i8259.cc
+++ b/src/dev/x86/i8259.cc
@@ -128,8 +128,9 @@ X86ISA::I8259::write(PacketPtr pkt)
break;
case 0x1:
DPRINTF(I8259, "Received initialization command word 2.\n");
+ vectorOffset = val & ~mask(3);
DPRINTF(I8259, "Responsible for vectors %#x-%#x.\n",
- val & ~mask(3), val | mask(3));
+ vectorOffset, vectorOffset | mask(3));
if (cascadeMode) {
initControlWord++;
} else {
diff --git a/src/dev/x86/i8259.hh b/src/dev/x86/i8259.hh
index 7804fe3b7..107cd015c 100644
--- a/src/dev/x86/i8259.hh
+++ b/src/dev/x86/i8259.hh
@@ -53,6 +53,9 @@ class I8259 : public BasicPioDevice, public IntDev
// Interrupt Mask Register
uint8_t IMR;
+ // The higher order bits of the vector to return
+ uint8_t vectorOffset;
+
bool cascadeMode;
// A bit vector of lines with slaves attached, or the slave id, depending
// on if this is a master or slave PIC.
@@ -77,7 +80,7 @@ class I8259 : public BasicPioDevice, public IntDev
I8259(Params * p) : BasicPioDevice(p), IntDev(this),
latency(p->pio_latency), output(p->output),
mode(p->mode), IRR(0), ISR(0), IMR(0),
- readIRR(true), initControlWord(0)
+ vectorOffset(0), readIRR(true), initControlWord(0)
{
pioSize = 2;
}