53 #ifndef __ARCH_X86_INTERRUPTS_HH__
54 #define __ARCH_X86_INTERRUPTS_HH__
63 #include "params/X86LocalApic.hh"
101 Event(), localApic(_localApic)
149 if (
regs[base + offset] != 0) {
171 regs[base + (vector / 32)] |= (1 << (vector % 32));
177 regs[base + (vector / 32)] &= ~(1 << (vector % 32));
183 return bits(
regs[base + (vector / 32)], vector % 32);
215 void init()
override;
231 return entry.periodic;
239 if (if_name ==
"int_master") {
248 if (if_name ==
"int_slave") {
306 panic(
"Interrupts::post unimplemented!\n");
312 panic(
"Interrupts::clear unimplemented!\n");
318 panic(
"Interrupts::clearAll unimplemented!\n");
324 #endif // __ARCH_X86_INTERRUPTS_HH__
bool pendingUnmaskableInt
IntMasterPort intMasterPort
void post(int int_num, int index)
const PortID InvalidPortID
Bitfield< 10, 8 > deliveryMode
void setCPU(BaseCPU *newCPU)
uint32_t readReg(ApicRegIndex miscReg)
EndBitUnion(TriggerIntMessage) namespace DeliveryMode
int findRegArrayMSB(ApicRegIndex base)
void setRegNoEffect(ApicRegIndex reg, uint32_t val)
Tick recvResponse(PacketPtr pkt) override
const Params * params() const
AddrRangeList getIntAddrRange() const override
void updateIntrInfo(ThreadContext *tc)
Tick read(PacketPtr pkt) override
Pure virtual function that the device must implement.
void setReg(ApicRegIndex reg, uint32_t val)
void clear(int int_num, int index)
ThreadContext is the external interface to all thread state for anything outside of the CPU...
ApicTimerEvent apicTimerEvent
A BaseSlavePort is a protocol-agnostic slave port, responsible only for the structural connection to ...
Tick recvMessage(PacketPtr pkt) override
Fault getInterrupt(ThreadContext *tc)
X86LocalApicParams Params
void setRegArrayBit(ApicRegIndex base, uint8_t vector)
uint64_t Tick
Tick count type.
bool getRegArrayBit(ApicRegIndex base, uint8_t vector)
void requestInterrupt(uint8_t vector, uint8_t deliveryMode, bool level)
ApicRegIndex decodeAddr(Addr paddr)
bool checkInterruptsRaw() const
Check if there are pending interrupts without ignoring the interrupts disabled flag.
uint32_t regs[NUM_APIC_REGS]
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
virtual BaseSlavePort & getSlavePort(const std::string &if_name, PortID idx=InvalidPortID)
Get a slave port with a given name and index.
A Packet is used to encapsulate a transfer between two objects in the memory system (e...
BaseSlavePort & getSlavePort(const std::string &if_name, PortID idx=InvalidPortID) override
Get a slave port with a given name and index.
void serialize(CheckpointOut &cp) const override
Serialize an object.
std::ostream CheckpointOut
int divideFromConf(uint32_t conf)
ApicTimerEvent(Interrupts *_localApic)
bool checkInterrupts(ThreadContext *tc) const
A BaseMasterPort is a protocol-agnostic master port, responsible only for the structural connection t...
const SimObjectParams * _params
Cached copy of the object parameters.
bool hasPendingUnmaskable() const
Check if there are pending unmaskable interrupts.
IntSlavePort intSlavePort
Tick write(PacketPtr pkt) override
Pure virtual function that the device must implement.
int findMsbSet(uint64_t val)
Returns the bit position of the MSB that is set in the input.
int16_t PortID
Port index/ID type, and a symbolic name for an invalid port id.
BaseMasterPort & getMasterPort(const std::string &if_name, PortID idx=InvalidPortID) override
Get a master port with a given name and index.
void unserialize(CheckpointIn &cp) override
Unserialize an object.
T bits(T val, int first, int last)
Extract the bitfield from position 'first' to 'last' (inclusive) from 'val' and right justify it...
bool triggerTimerInterrupt()
std::shared_ptr< FaultBase > Fault
BitUnion32(LVTEntry) Bitfield<7
virtual BaseMasterPort & getMasterPort(const std::string &if_name, PortID idx=InvalidPortID)
Get a master port with a given name and index.
void clearRegArrayBit(ApicRegIndex base, uint8_t vector)