changeset e18928b6b108 in /z/repo/m5
details: http://repo.m5sim.org/m5?cmd=changeset;node=e18928b6b108
description:
X86: Make auto eoi mode work in the I8259 PIC.
diffstat:
1 file changed, 1 insertion(+)
src/dev/x86/i8259.hh | 1 +
diffs (60 lines):
diff -r cec3cfa0b6b5 -r e18928b6b108 src/dev/x86/i8259.cc
--- a/src/dev/x86/i8259.cc Sun Oct 12 23:25:48 2008 -0700
+++ b/src/dev/x86/i8259.cc Sun Oct 12 23:27:08 2008 -0700
@@ -36,7 +36,7 @@
latency(p->pio_latency), output(p->output),
mode(p->mode), slave(NULL),
IRR(0), ISR(0), IMR(0),
- readIRR(true), initControlWord(0)
+ readIRR(true), initControlWord(0), autoEOI(false)
{
if (output) {
I8259 * master;
@@ -91,6 +91,9 @@
DPRINTF(I8259, "%s mode.\n",
cascadeMode ? "Cascade" : "Single");
expectICW4 = bits(val, 0);
+ if (!expectICW4) {
+ autoEOI = false;
+ }
initControlWord = 1;
DPRINTF(I8259, "Expecting %d more bytes.\n", expectICW4 ? 3 : 2);
} else if (bits(val, 4, 3) == 0) {
@@ -203,8 +206,10 @@
} else {
DPRINTF(I8259, "Unrecognized buffer mode.\n");
}
+ autoEOI = bits(val, 1);
DPRINTF(I8259, "%s End Of Interrupt.\n",
- bits(val, 1) ? "Automatic" : "Normal");
+ autoEOI ? "Automatic" : "Normal");
+
DPRINTF(I8259, "%s mode.\n", bits(val, 0) ? "80x86" : "MCX-80/85");
initControlWord = 0;
break;
@@ -265,7 +270,11 @@
int line = findMsbSet(IRR);
IRR &= ~(1 << line);
DPRINTF(I8259, "Interrupt %d was accepted.\n", line);
- ISR |= 1 << line;
+ if (autoEOI) {
+ handleEOI(line);
+ } else {
+ ISR |= 1 << line;
+ }
if (slave && bits(cascadeBits, line)) {
DPRINTF(I8259, "Interrupt was from slave who will "
"provide the vector.\n");
diff -r cec3cfa0b6b5 -r e18928b6b108 src/dev/x86/i8259.hh
--- a/src/dev/x86/i8259.hh Sun Oct 12 23:25:48 2008 -0700
+++ b/src/dev/x86/i8259.hh Sun Oct 12 23:27:08 2008 -0700
@@ -73,6 +73,9 @@
bool expectICW4;
int initControlWord;
+ // Whether or not the PIC is in auto EOI mode.
+ bool autoEOI;
+
void requestInterrupt(int line);
void handleEOI(int line);
_______________________________________________
m5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/m5-dev