50 #ifndef __DEV_ARM_VGIC_H__ 51 #define __DEV_ARM_VGIC_H__ 61 #include "params/VGic.hh" 157 : vctrl(0), hcr(0), eisr(0), VMGrp0En(0), VMGrp1En(0),
158 VMAckCtl(0), VMFiqEn(0), VMCBPR(0), VEM(0), VMABP(0), VMBP(0),
163 virtual ~vcpuIntData() {}
165 std::array<ListReg, NUM_LR> LR;
186 struct std::array<vcpuIntData, VGIC_CPU_MAX>
vcpuData;
193 return dynamic_cast<const Params *
>(
_params);
195 VGic(
const Params *
p);
214 uint32_t
getMISR(
struct vcpuIntData *vid);
222 unsigned int pend = 0;
224 if (vid->LR[
i].State & LR_PENDING)
231 unsigned int valid = 0;
233 if (vid->LR[
i].State)
242 unsigned int prio = 0xff;
245 if ((vid->LR[
i].State & LR_PENDING) && (vid->LR[
i].Priority < prio)) {
247 prio = vid->LR[
i].Priority;
256 if (vid->LR[
i].State &&
257 vid->LR[
i].VirtualID == virq &&
258 vid->LR[
i].CpuID == vcpu)
static const int GICH_HCR
static const int GICH_VTR
static const int GICV_CTLR
EndBitUnion(VCTLR) struct vcpuIntData struct std::array< vcpuIntData, VGIC_CPU_MAX > vcpuData
Bitfield< 9, 0 > VirtualID
static const int GICV_SIZE
unsigned int lrValid(struct vcpuIntData *vid)
bool maintIntPosted[VGIC_CPU_MAX]
uint32_t getMISR(struct vcpuIntData *vid)
EndBitUnion(ListReg) BitUnion32(HCR) Bitfield< 31
static const int GICV_IIDR
static const int GICH_LR3
void processPostVIntEvent(uint32_t cpu)
Post interrupt to CPU.
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
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.
EventFunctionWrapper * postVIntEvent[VGIC_CPU_MAX]
static const uint32_t LR_PENDING
const Params * params() const
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.
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
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
const SimObjectParams * _params
Cached copy of the object parameters.
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)
static const int GICV_AIAR
static const int GICH_LR1
static const int GICV_DIR
static const int GICV_AHPPIR
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