summaryrefslogtreecommitdiff
path: root/src/dev/x86
diff options
context:
space:
mode:
authorGabe Black <gblack@eecs.umich.edu>2008-10-12 13:44:24 -0700
committerGabe Black <gblack@eecs.umich.edu>2008-10-12 13:44:24 -0700
commit876f4845f258ed09d348135d8af8cf4a17de1b8a (patch)
tree2d109af5103908a7f1561f3610b8e55add81ec7f /src/dev/x86
parent4d5c7f70389b8911e37d391b09023dbf6a6ab0d9 (diff)
downloadgem5-876f4845f258ed09d348135d8af8cf4a17de1b8a.tar.xz
X86: Make the local APIC handle interrupt messages from the IO APIC.
Diffstat (limited to 'src/dev/x86')
-rw-r--r--src/dev/x86/i82094aa.cc31
-rw-r--r--src/dev/x86/i8259.hh3
-rw-r--r--src/dev/x86/pc.cc3
3 files changed, 10 insertions, 27 deletions
diff --git a/src/dev/x86/i82094aa.cc b/src/dev/x86/i82094aa.cc
index 1ae3b01cf..d7f479106 100644
--- a/src/dev/x86/i82094aa.cc
+++ b/src/dev/x86/i82094aa.cc
@@ -146,33 +146,12 @@ X86ISA::I82094AA::signalInterrupt(int line)
return;
} else {
if (DTRACE(I82094AA)) {
- switch(entry.deliveryMode) {
- case 0:
- DPRINTF(I82094AA, "Delivery mode is: Fixed.\n");
- break;
- case 1:
- DPRINTF(I82094AA, "Delivery mode is: Lowest Priority.\n");
- break;
- case 2:
- DPRINTF(I82094AA, "Delivery mode is: SMI.\n");
- break;
- case 3:
+ if (DeliveryMode::isReserved(entry.deliveryMode)) {
fatal("Tried to use reserved delivery mode "
"for IO APIC entry %d.\n", line);
- break;
- case 4:
- DPRINTF(I82094AA, "Delivery mode is: NMI.\n");
- break;
- case 5:
- DPRINTF(I82094AA, "Delivery mode is: INIT.\n");
- break;
- case 6:
- fatal("Tried to use reserved delivery mode "
- "for IO APIC entry %d.\n", line);
- break;
- case 7:
- DPRINTF(I82094AA, "Delivery mode is: ExtINT.\n");
- break;
+ } else {
+ DPRINTF(I82094AA, "Delivery mode is: %s.\n",
+ DeliveryMode::names[entry.deliveryMode]);
}
DPRINTF(I82094AA, "Vector is %#x.\n", entry.vector);
}
@@ -182,6 +161,8 @@ X86ISA::I82094AA::signalInterrupt(int line)
message.vector = entry.vector;
message.deliveryMode = entry.deliveryMode;
message.destMode = entry.destMode;
+ message.level = entry.polarity;
+ message.trigger = entry.trigger;
if (entry.destMode == 0) {
DPRINTF(I82094AA,
diff --git a/src/dev/x86/i8259.hh b/src/dev/x86/i8259.hh
index 1c14e5397..7804fe3b7 100644
--- a/src/dev/x86/i8259.hh
+++ b/src/dev/x86/i8259.hh
@@ -76,7 +76,8 @@ class I8259 : public BasicPioDevice, public IntDev
I8259(Params * p) : BasicPioDevice(p), IntDev(this),
latency(p->pio_latency), output(p->output),
- mode(p->mode), readIRR(true), initControlWord(0)
+ mode(p->mode), IRR(0), ISR(0), IMR(0),
+ readIRR(true), initControlWord(0)
{
pioSize = 2;
}
diff --git a/src/dev/x86/pc.cc b/src/dev/x86/pc.cc
index 4cd81dd50..94fb23e21 100644
--- a/src/dev/x86/pc.cc
+++ b/src/dev/x86/pc.cc
@@ -36,6 +36,7 @@
#include <string>
#include <vector>
+#include "arch/x86/intmessage.hh"
#include "arch/x86/x86_traits.hh"
#include "cpu/intr_control.hh"
#include "dev/terminal.hh"
@@ -78,7 +79,7 @@ Pc::init()
*/
I82094AA & ioApic = *southBridge->ioApic;
I82094AA::RedirTableEntry entry = 0;
- entry.deliveryMode = 0x7;
+ entry.deliveryMode = DeliveryMode::ExtInt;
entry.vector = 0x20;
ioApic.writeReg(0x10, entry.bottomDW);
ioApic.writeReg(0x11, entry.topDW);