diff options
Diffstat (limited to 'src/arch/x86')
-rw-r--r-- | src/arch/x86/X86LocalApic.py | 5 | ||||
-rw-r--r-- | src/arch/x86/interrupts.cc | 6 | ||||
-rw-r--r-- | src/arch/x86/interrupts.hh | 5 |
3 files changed, 15 insertions, 1 deletions
diff --git a/src/arch/x86/X86LocalApic.py b/src/arch/x86/X86LocalApic.py index b9be19b64..cfb225240 100644 --- a/src/arch/x86/X86LocalApic.py +++ b/src/arch/x86/X86LocalApic.py @@ -26,7 +26,9 @@ # # Authors: Gabe Black +from m5.defines import buildEnv from m5.params import * +from m5.proxy import * from Device import BasicPioDevice class X86LocalApic(BasicPioDevice): @@ -36,3 +38,6 @@ class X86LocalApic(BasicPioDevice): 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 --git a/src/arch/x86/interrupts.cc b/src/arch/x86/interrupts.cc index 7d6f6e35e..81cb306dc 100644 --- a/src/arch/x86/interrupts.cc +++ b/src/arch/x86/interrupts.cc @@ -302,10 +302,11 @@ X86ISA::Interrupts::init() // BasicPioDevice::init(); IntDev::init(); - +#if FULL_SYSTEM Pc * pc = dynamic_cast<Pc *>(platform); assert(pc); pc->southBridge->ioApic->registerLocalApic(initialApicId, this); +#endif } @@ -613,6 +614,9 @@ X86ISA::Interrupts::Interrupts(Params * p) : 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 --git a/src/arch/x86/interrupts.hh b/src/arch/x86/interrupts.hh index f5d86219b..46e5e5cad 100644 --- a/src/arch/x86/interrupts.hh +++ b/src/arch/x86/interrupts.hh @@ -44,6 +44,7 @@ #include "arch/x86/faults.hh" #include "arch/x86/intmessage.hh" #include "base/bitfield.hh" +#include "config/full_system.hh" #include "cpu/thread_context.hh" #include "dev/x86/intdev.hh" #include "dev/io_device.hh" @@ -175,6 +176,10 @@ class Interrupts : public BasicPioDevice, IntDev int initialApicId; +#if FULL_SYSTEM + Platform *platform; +#endif + public: /* * Params stuff. |