diff options
author | Gabe Black <gblack@eecs.umich.edu> | 2011-10-09 04:44:02 -0700 |
---|---|---|
committer | Gabe Black <gblack@eecs.umich.edu> | 2011-10-09 04:44:02 -0700 |
commit | 48b40cff650cb071b189826af2f2e1f78434f49b (patch) | |
tree | cdd36ce1e5caec2f5846f310801053ea91952c03 /src/dev/x86 | |
parent | f338d60930e973d330d13715b8617c22b980dcca (diff) | |
download | gem5-48b40cff650cb071b189826af2f2e1f78434f49b.tar.xz |
Interrupts: Make the IO APIC go get the local APICs.
This is so they don't have to declare themselves to the IO APIC and don't have
to have a pointer to the platform object.
Diffstat (limited to 'src/dev/x86')
-rw-r--r-- | src/dev/x86/i82094aa.cc | 21 | ||||
-rw-r--r-- | src/dev/x86/i82094aa.hh | 3 |
2 files changed, 4 insertions, 20 deletions
diff --git a/src/dev/x86/i82094aa.cc b/src/dev/x86/i82094aa.cc index be7852e86..b864bc5c7 100644 --- a/src/dev/x86/i82094aa.cc +++ b/src/dev/x86/i82094aa.cc @@ -30,11 +30,9 @@ #include "config/full_system.hh" -#if FULL_SYSTEM #include "arch/x86/interrupts.hh" -#endif - #include "arch/x86/intmessage.hh" +#include "cpu/base.hh" #include "debug/I82094AA.hh" #include "dev/x86/i82094aa.hh" #include "dev/x86/i8259.hh" @@ -172,7 +170,6 @@ X86ISA::I82094AA::signalInterrupt(int line) DPRINTF(I82094AA, "Entry was masked.\n"); return; } else { -#if FULL_SYSTEM //XXX No interrupt controller in SE mode. TriggerIntMessage message = 0; message.destination = entry.dest; if (entry.deliveryMode == DeliveryMode::ExtInt) { @@ -202,13 +199,11 @@ X86ISA::I82094AA::signalInterrupt(int line) } } else { for (int i = 0; i < numContexts; i++) { - std::map<int, Interrupts *>::iterator localApicIt = - localApics.find(i); - assert(localApicIt != localApics.end()); - Interrupts *localApic = localApicIt->second; + Interrupts *localApic = sys->getThreadContext(i)-> + getCpuPtr()->getInterruptController(); if ((localApic->readReg(APIC_LOGICAL_DESTINATION) >> 24) & message.destination) { - apics.push_back(localApicIt->first); + apics.push_back(localApic->getInitialApicId()); } } if (message.deliveryMode == DeliveryMode::LowestPriority && @@ -231,7 +226,6 @@ X86ISA::I82094AA::signalInterrupt(int line) } intPort->sendMessage(apics, message, sys->getMemoryMode() == Enums::timing); -#endif } } @@ -252,13 +246,6 @@ X86ISA::I82094AA::lowerInterruptPin(int number) } void -X86ISA::I82094AA::registerLocalApic(int initialId, Interrupts *localApic) -{ - assert(localApic); - localApics[initialId] = localApic; -} - -void X86ISA::I82094AA::serialize(std::ostream &os) { uint64_t* redirTableArray = (uint64_t*)redirTable; diff --git a/src/dev/x86/i82094aa.hh b/src/dev/x86/i82094aa.hh index ae0322d94..00ba2800d 100644 --- a/src/dev/x86/i82094aa.hh +++ b/src/dev/x86/i82094aa.hh @@ -70,8 +70,6 @@ class I82094AA : public PioDevice, public IntDev I8259 * extIntPic; - std::map<int, Interrupts *> localApics; - uint8_t regSel; uint8_t initialApicId; uint8_t id; @@ -131,7 +129,6 @@ class I82094AA : public PioDevice, public IntDev void signalInterrupt(int line); void raiseInterruptPin(int number); void lowerInterruptPin(int number); - void registerLocalApic(int id, Interrupts *localApic); virtual void serialize(std::ostream &os); virtual void unserialize(Checkpoint *cp, const std::string §ion); |