changeset 42d3554b1c35 in /z/repo/gem5
details: http://repo.gem5.org/gem5?cmd=changeset;node=42d3554b1c35
description:
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:
src/arch/x86/X86LocalApic.py | 3 ---
src/arch/x86/interrupts.cc | 8 --------
src/arch/x86/interrupts.hh | 7 +++----
src/dev/x86/i82094aa.cc | 21 ++++-----------------
src/dev/x86/i82094aa.hh | 3 ---
5 files changed, 7 insertions(+), 35 deletions(-)
diffs (136 lines):
diff -r 575cab0db076 -r 42d3554b1c35 src/arch/x86/X86LocalApic.py
--- a/src/arch/x86/X86LocalApic.py Sun Oct 09 00:15:50 2011 -0700
+++ b/src/arch/x86/X86LocalApic.py Sun Oct 09 04:44:02 2011 -0700
@@ -38,6 +38,3 @@
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.")
diff -r 575cab0db076 -r 42d3554b1c35 src/arch/x86/interrupts.cc
--- a/src/arch/x86/interrupts.cc Sun Oct 09 00:15:50 2011 -0700
+++ b/src/arch/x86/interrupts.cc Sun Oct 09 04:44:02 2011 -0700
@@ -304,11 +304,6 @@
//
BasicPioDevice::init();
IntDev::init();
-#if FULL_SYSTEM
- Pc * pc = dynamic_cast<Pc *>(platform);
- assert(pc);
- pc->southBridge->ioApic->registerLocalApic(initialApicId, this);
-#endif
}
@@ -616,9 +611,6 @@
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));
diff -r 575cab0db076 -r 42d3554b1c35 src/arch/x86/interrupts.hh
--- a/src/arch/x86/interrupts.hh Sun Oct 09 00:15:50 2011 -0700
+++ b/src/arch/x86/interrupts.hh Sun Oct 09 04:44:02 2011 -0700
@@ -176,11 +176,10 @@
int initialApicId;
-#if FULL_SYSTEM
- Platform *platform;
-#endif
+ public:
- public:
+ int getInitialApicId() { return initialApicId; }
+
/*
* Params stuff.
*/
diff -r 575cab0db076 -r 42d3554b1c35 src/dev/x86/i82094aa.cc
--- a/src/dev/x86/i82094aa.cc Sun Oct 09 00:15:50 2011 -0700
+++ b/src/dev/x86/i82094aa.cc Sun Oct 09 04:44:02 2011 -0700
@@ -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 @@
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 @@
}
} 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 @@
}
intPort->sendMessage(apics, message,
sys->getMemoryMode() == Enums::timing);
-#endif
}
}
@@ -252,13 +246,6 @@
}
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 -r 575cab0db076 -r 42d3554b1c35 src/dev/x86/i82094aa.hh
--- a/src/dev/x86/i82094aa.hh Sun Oct 09 00:15:50 2011 -0700
+++ b/src/dev/x86/i82094aa.hh Sun Oct 09 04:44:02 2011 -0700
@@ -70,8 +70,6 @@
I8259 * extIntPic;
- std::map<int, Interrupts *> localApics;
-
uint8_t regSel;
uint8_t initialApicId;
uint8_t id;
@@ -131,7 +129,6 @@
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);
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev