#include "arch/x86/interrupts.hh"
#include "arch/x86/intmessage.hh"
#include "cpu/base.hh"
+#include "dev/x86/i82094aa.hh"
+#include "dev/x86/pc.hh"
+#include "dev/x86/south_bridge.hh"
#include "mem/packet_access.hh"
#include "sim/system.hh"
}
+void
+X86ISA::Interrupts::init()
+{
+ BasicPioDevice::init();
+ Pc * pc = dynamic_cast<Pc *>(platform);
+ assert(pc);
+ pc->southBridge->ioApic->registerLocalApic(initialApicId, this);
+}
+
+
Tick
X86ISA::Interrupts::recvMessage(PacketPtr pkt)
{
return dynamic_cast<const Params *>(_params);
}
+ /*
+ * Initialize this object by registering it with the IO APIC.
+ */
+ void init();
+
/*
* Functions to interact with the interrupt port from IntDev.
*/
pinStates[number] = false;
}
+void
+X86ISA::I82094AA::registerLocalApic(int initialId, Interrupts *localApic)
+{
+ assert(localApic);
+ localApics[initialId] = localApic;
+}
+
X86ISA::I82094AA *
I82094AAParams::create()
{
#include "dev/x86/intdev.hh"
#include "params/I82094AA.hh"
+#include <map>
+
namespace X86ISA
{
class I8259;
+class Interrupts;
class I82094AA : public PioDevice, public IntDev
{
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);
};
}; // namespace X86ISA