X86: Implement the EOI register in the local APIC.
authorGabe Black <gblack@eecs.umich.edu>
Mon, 13 Oct 2008 06:28:11 +0000 (23:28 -0700)
committerGabe Black <gblack@eecs.umich.edu>
Mon, 13 Oct 2008 06:28:11 +0000 (23:28 -0700)
src/arch/x86/interrupts.cc

index 148b26157bc55ede27a119083da7951d0accc932..df1b40e5bdec7de236265c7d1ff33bef1a7490c3 100644 (file)
@@ -330,9 +330,6 @@ X86ISA::Interrupts::readReg(ApicRegIndex reg)
       case APIC_PROCESSOR_PRIORITY:
         panic("Local APIC Processor Priority register unimplemented.\n");
         break;
-      case APIC_EOI:
-        panic("Local APIC EOI register unimplemented.\n");
-        break;
       case APIC_ERROR_STATUS:
         regs[APIC_INTERNAL_STATE] &= ~ULL(0x1);
         break;
@@ -391,8 +388,10 @@ X86ISA::Interrupts::setReg(ApicRegIndex reg, uint32_t val)
         panic("Local APIC Processor Priority register unimplemented.\n");
         break;
       case APIC_EOI:
-        panic("Local APIC EOI register unimplemented.\n");
-        break;
+        // Remove the interrupt that just completed from the local apic state.
+        clearRegArrayBit(APIC_IN_SERVICE_BASE, ISRV);
+        updateISRV();
+        return;
       case APIC_LOGICAL_DESTINATION:
         newVal = val & 0xFF000000;
         break;