50#ifndef __ARCH_X86_INTERRUPTS_HH__
51#define __ARCH_X86_INTERRUPTS_HH__
62#include "params/X86LocalApic.hh"
208 void init()
override;
224 return entry.periodic;
237 if (if_name ==
"int_requestor") {
239 }
else if (if_name ==
"int_responder") {
241 }
else if (if_name ==
"pio") {
243 }
else if (if_name ==
"lint0") {
245 }
else if (if_name ==
"lint1") {
304 panic(
"Interrupts::post unimplemented!\n");
310 panic(
"Interrupts::clear unimplemented!\n");
316 panic(
"Interrupts::clearAll unimplemented!\n");
The ClockDomain provides clock to group of clocked objects bundled under the same clock domain.
Tick clockPeriod() const
Get the clock period.
A Packet is used to encapsulate a transfer between two objects in the memory system (e....
The PioPort class is a programmed i/o port that all devices that are sensitive to an address range us...
Ports are used to interface objects to each other.
ThreadContext is the external interface to all thread state for anything outside of the CPU.
void unserialize(CheckpointIn &cp) override
Unserialize an object.
Interrupts(const Params &p)
Port & getPort(const std::string &if_name, PortID idx=InvalidPortID) override
Get a port with a given name and index.
void processApicTimerEvent()
void completeIPI(PacketPtr pkt)
void init() override
init() is called after all C++ SimObjects have been created and all ports are connected.
void post(int int_num, int index) override
bool triggerTimerInterrupt()
bool checkInterrupts() const override
int findRegArrayMSB(ApicRegIndex base)
void clear(int int_num, int index) override
void setRegArrayBit(ApicRegIndex base, uint8_t vector)
AddrRangeList getIntAddrRange() const
Bitfield< 10, 8 > deliveryMode
void setReg(ApicRegIndex reg, uint32_t val)
AddrRangeList getAddrRanges() const
X86LocalApicParams Params
IntRequestPort< Interrupts > intRequestPort
bool getRegArrayBit(ApicRegIndex base, uint8_t vector)
uint32_t regs[NUM_APIC_REGS]
void updateIntrInfo() override
bool checkInterruptsRaw() const
Check if there are pending interrupts without ignoring the interrupts disabled flag.
Tick recvMessage(PacketPtr pkt)
void raiseInterruptPin(int number)
IntSinkPin< Interrupts > lint1Pin
bool pendingUnmaskableInt
void clearRegArrayBit(ApicRegIndex base, uint8_t vector)
IntSinkPin< Interrupts > lint0Pin
void requestInterrupt(uint8_t vector, uint8_t deliveryMode, bool level)
PioPort< Interrupts > pioPort
ClockDomain & clockDomain
void serialize(CheckpointOut &cp) const override
Serialize an object.
Tick write(PacketPtr pkt)
void setThreadContext(ThreadContext *_tc) override
BitUnion32(LVTEntry) Bitfield< 7
bool hasPendingUnmaskable() const
Check if there are pending unmaskable interrupts.
IntResponsePort< Interrupts > intResponsePort
void setRegNoEffect(ApicRegIndex reg, uint32_t val)
Fault getInterrupt() override
uint32_t readReg(ApicRegIndex miscReg)
void lowerInterruptPin(int number)
constexpr int findMsbSet(uint64_t val)
Returns the bit position of the MSB that is set in the input.
constexpr T bits(T val, unsigned first, unsigned last)
Extract the bitfield from position 'first' to 'last' (inclusive) from 'val' and right justify it.
#define EndBitUnion(name)
This closes off the class and union started by the above macro.
#define panic(...)
This implements a cprintf based panic() function.
virtual Port & getPort(const std::string &if_name, PortID idx=InvalidPortID)
Get a port with a given name and index.
@ APIC_INTERRUPT_REQUEST_BASE
ApicRegIndex decodeAddr(Addr paddr)
Copyright (c) 2024 - Pranith Kumar Copyright (c) 2020 Inria All rights reserved.
std::shared_ptr< FaultBase > Fault
const PortID InvalidPortID
std::ostream CheckpointOut
int divideFromConf(uint32_t conf)
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
int16_t PortID
Port index/ID type, and a symbolic name for an invalid port id.
uint64_t Tick
Tick count type.