52 #ifndef __DEV_ARM_VGIC_H__
53 #define __DEV_ARM_VGIC_H__
63 #include "params/VGic.hh"
119 const char *
description()
const {
return "Post VInterrupt to CPU"; }
178 std::array<ListReg, NUM_LR>
LR;
226 uint32_t
getMISR(
struct vcpuIntData *vid);
234 unsigned int pend = 0;
243 unsigned int valid = 0;
245 if (vid->LR[
i].State)
254 unsigned int prio = 0xff;
257 if ((vid->LR[
i].State &
LR_PENDING) && (vid->LR[
i].Priority < prio)) {
259 prio = vid->LR[
i].Priority;
268 if (vid->LR[
i].State &&
269 vid->LR[
i].VirtualID == virq &&
270 vid->LR[
i].CpuID == vcpu)
static const int GICH_HCR
static const int GICH_VTR
static const int GICV_CTLR
Bitfield< 9, 0 > VirtualID
static const int GICV_SIZE
void post(int cpu_id, int int_num, int index)
unsigned int lrValid(struct vcpuIntData *vid)
bool maintIntPosted[VGIC_CPU_MAX]
uint32_t getMISR(struct vcpuIntData *vid)
EndBitUnion(ListReg) BitUnion32(HCR) Bitfield< 31
Event definition to post interrupt to CPU after a delay.
static const int GICV_IIDR
static const int GICH_LR3
PostVIntEvent(uint32_t c, Platform *p)
AddrRangeList getAddrRanges() const override
Every PIO device is obliged to provide an implementation that returns the address ranges the device r...
static const int GICV_APR0
PostVIntEvent * postVIntEvent[VGIC_CPU_MAX]
const char * description() const
Return a C string describing the event.
void updateIntState(ContextID ctx_id)
static const int GICV_BPR
static const int GICH_MISR
uint64_t Tick
Tick count type.
void unPostVInt(uint32_t cpu)
Tick read(PacketPtr pkt) override
Pure virtual function that the device must implement.
void serialize(CheckpointOut &cp) const override
Serialize an object.
static const uint32_t LR_PENDING
This device is the base class which all devices senstive to an address range inherit from...
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
std::array< ListReg, NUM_LR > LR
A Packet is used to encapsulate a transfer between two objects in the memory system (e...
BitUnion32(ListReg) Bitfield< 31 > HW
Basic support for object serialization.
static const int GICV_AEOIR
struct std::array< vcpuIntData, VGIC_CPU_MAX > vcpuData
void postMaintInt(uint32_t cpu)
Tick readVCpu(PacketPtr pkt)
static const int GICV_RPR
static const int GICV_HPPIR
static const int GICH_ELSR1
static const int GICH_LR0
Tick write(PacketPtr pkt) override
Pure virtual function that the device must implement.
static const int GICH_VMCR
void unserialize(CheckpointIn &cp) override
Unserialize an object.
unsigned int lrPending(struct vcpuIntData *vid)
std::ostream CheckpointOut
static const int GICH_LR2
static const int GICV_EOIR
static const int VGIC_CPU_MAX
static const int GICH_SIZE
Bitfield< 27, 23 > Priority
int findLRForVIRQ(struct vcpuIntData *vid, int virq, int vcpu)
int findHighestPendingLR(struct vcpuIntData *vid)
Returns LR index or -1 if none pending.
Tick writeCtrl(PacketPtr pkt)
const SimObjectParams * _params
Cached copy of the object parameters.
static const int GICV_AIAR
static const int GICH_LR1
static const int GICV_DIR
static const int GICV_AHPPIR
const Params * params() const
void postVInt(uint32_t cpu, Tick when)
Tick writeVCpu(PacketPtr pkt)
static const int GICH_APR0
static const uint32_t LR_ACTIVE
Tick readCtrl(PacketPtr pkt)
static const int GICH_ELSR0
static const int GICH_REG_SIZE
static const int GICV_PMR
static const int GICH_EISR1
int ContextID
Globally unique thread context ID.
static const int GICV_ABPR
bool vIntPosted[VGIC_CPU_MAX]
static const int GICH_EISR0
void unPostMaintInt(uint32_t cpu)
static const int GICV_IAR