int_port = Port("Port for sending and receiving interrupt messages")
int_latency = Param.Latency('1ns', \
"Latency for an interrupt to propagate through this device.")
- if buildEnv['FULL_SYSTEM']: # No platform in SE mode.
- platform = Param.Platform(Parent.any,
- "Platform this device is part of.")
//
BasicPioDevice::init();
IntDev::init();
-#if FULL_SYSTEM
- Pc * pc = dynamic_cast<Pc *>(platform);
- assert(pc);
- pc->southBridge->ioApic->registerLocalApic(initialApicId, this);
-#endif
}
pendingStartup(false), startupVector(0),
startedUp(false), pendingUnmaskableInt(false),
pendingIPIs(0), cpu(NULL)
-#if FULL_SYSTEM
- , platform(p->platform)
-#endif
{
pioSize = PageBytes;
memset(regs, 0, sizeof(regs));
#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"
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) {
}
} 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 &&
}
intPort->sendMessage(apics, message,
sys->getMemoryMode() == Enums::timing);
-#endif
}
}
pinStates[number] = false;
}
-void
-X86ISA::I82094AA::registerLocalApic(int initialId, Interrupts *localApic)
-{
- assert(localApic);
- localApics[initialId] = localApic;
-}
-
void
X86ISA::I82094AA::serialize(std::ostream &os)
{
I8259 * extIntPic;
- std::map<int, Interrupts *> localApics;
-
uint8_t regSel;
uint8_t initialApicId;
uint8_t id;
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);