summaryrefslogtreecommitdiff
path: root/src/arch/x86/interrupts.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/arch/x86/interrupts.hh')
-rw-r--r--src/arch/x86/interrupts.hh21
1 files changed, 18 insertions, 3 deletions
diff --git a/src/arch/x86/interrupts.hh b/src/arch/x86/interrupts.hh
index 1d5f600bd..c4760dc0f 100644
--- a/src/arch/x86/interrupts.hh
+++ b/src/arch/x86/interrupts.hh
@@ -62,16 +62,16 @@
#include "arch/x86/faults.hh"
#include "cpu/thread_context.hh"
#include "dev/io_device.hh"
+#include "dev/x86/intdev.hh"
#include "params/X86LocalApic.hh"
#include "sim/eventq.hh"
-#include "sim/sim_object.hh"
class ThreadContext;
namespace X86ISA
{
-class Interrupts : public BasicPioDevice
+class Interrupts : public BasicPioDevice, IntDev
{
protected:
uint32_t regs[NUM_APIC_REGS];
@@ -108,6 +108,7 @@ class Interrupts : public BasicPioDevice
Tick read(PacketPtr pkt);
Tick write(PacketPtr pkt);
+ Tick recvMessage(PacketPtr pkt);
void addressRanges(AddrRangeList &range_list)
{
@@ -116,6 +117,13 @@ class Interrupts : public BasicPioDevice
x86LocalAPICAddress(0, 0) + PageBytes));
}
+ void getIntAddrRange(AddrRangeList &range_list)
+ {
+ range_list.clear();
+ range_list.push_back(RangeEx(x86InterruptAddress(0, 0),
+ x86InterruptAddress(0, 0) + PhysAddrAPICRangeSize));
+ }
+
uint32_t readReg(ApicRegIndex miscReg);
void setReg(ApicRegIndex reg, uint32_t val);
void setRegNoEffect(ApicRegIndex reg, uint32_t val)
@@ -123,7 +131,7 @@ class Interrupts : public BasicPioDevice
regs[reg] = val;
}
- Interrupts(Params * p) : BasicPioDevice(p),
+ Interrupts(Params * p) : BasicPioDevice(p), IntDev(this),
latency(p->pio_latency), clock(0)
{
pioSize = PageBytes;
@@ -133,6 +141,13 @@ class Interrupts : public BasicPioDevice
clear_all();
}
+ Port *getPort(const std::string &if_name, int idx = -1)
+ {
+ if (if_name == "int_port")
+ return intPort;
+ return BasicPioDevice::getPort(if_name, idx);
+ }
+
int InterruptLevel(uint64_t softint)
{
panic("Interrupts::InterruptLevel unimplemented!\n");