50#ifndef __DEV_ARM_VGIC_H__
51#define __DEV_ARM_VGIC_H__
60#include "params/VGic.hh"
160 : vctrl(0), hcr(0), eisr(0), VMGrp0En(0), VMGrp1En(0),
161 VMAckCtl(0), VMFiqEn(0), VMCBPR(0), VEM(0), VMABP(0), VMBP(0),
164 std::fill(LR.begin(), LR.end(), 0);
166 virtual ~vcpuIntData() {}
168 std::array<ListReg, NUM_LR> LR;
212 uint32_t
getMISR(
struct vcpuIntData *vid);
220 unsigned int pend = 0;
229 unsigned int valid = 0;
231 if (vid->LR[
i].State)
240 unsigned int prio = 0xff;
243 if ((vid->LR[
i].State &
LR_PENDING) && (vid->LR[
i].Priority < prio)) {
245 prio = vid->LR[
i].Priority;
254 if (vid->LR[
i].State &&
255 vid->LR[
i].VirtualID == virq &&
256 vid->LR[
i].CpuID == vcpu)
A Packet is used to encapsulate a transfer between two objects in the memory system (e....
This device is the base class which all devices senstive to an address range inherit from.
Basic support for object serialization.
Tick read(PacketPtr pkt) override
Pure virtual function that the device must implement.
static const int GICV_APR0
static const int GICV_BPR
AddrRangeList getAddrRanges() const override
Every PIO device is obliged to provide an implementation that returns the address ranges the device r...
Bitfield< 9, 0 > VirtualID
Tick writeCtrl(PacketPtr pkt)
static const int GICH_LR2
static const int GICV_CTLR
static const uint32_t LR_PENDING
static const int GICH_HCR
static const int GICH_MISR
static const int GICH_ELSR1
static const int GICV_AEOIR
Tick readVCpu(PacketPtr pkt)
void postVInt(uint32_t cpu, Tick when)
void unPostMaintInt(uint32_t cpu)
EventFunctionWrapper * postVIntEvent[VGIC_CPU_MAX]
static const int GICH_VMCR
Tick readCtrl(PacketPtr pkt)
uint32_t getMISR(struct vcpuIntData *vid)
BitUnion32(ListReg) Bitfield< 31 > HW
int findLRForVIRQ(struct vcpuIntData *vid, int virq, int vcpu)
void serialize(CheckpointOut &cp) const override
Serialize an object.
static const int GICV_HPPIR
static const int GICH_EISR0
unsigned int lrPending(struct vcpuIntData *vid)
static const int GICH_REG_SIZE
unsigned int lrValid(struct vcpuIntData *vid)
static const int GICV_DIR
Tick write(PacketPtr pkt) override
Pure virtual function that the device must implement.
static const int GICV_ABPR
static const int GICV_AIAR
int findHighestPendingLR(struct vcpuIntData *vid)
Returns LR index or -1 if none pending.
static const uint32_t LR_ACTIVE
static const int GICH_SIZE
static const int GICH_LR1
static const int GICV_EOIR
static const int GICH_APR0
static const int GICH_LR0
static const int GICV_PMR
bool maintIntPosted[VGIC_CPU_MAX]
bool vIntPosted[VGIC_CPU_MAX]
static const int GICV_AHPPIR
void unPostVInt(uint32_t cpu)
Tick writeVCpu(PacketPtr pkt)
EndBitUnion(VCTLR) struct vcpuIntData struct std::array< vcpuIntData, VGIC_CPU_MAX > vcpuData
static const int GICH_LR3
void updateIntState(ContextID ctx_id)
static const int GICV_SIZE
static const int VGIC_CPU_MAX
void postMaintInt(uint32_t cpu)
Bitfield< 27, 23 > Priority
EndBitUnion(ListReg) BitUnion32(HCR) Bitfield< 31
static const int GICH_VTR
static const int GICV_IIDR
void unserialize(CheckpointIn &cp) override
Unserialize an object.
static const int GICV_IAR
static const int GICH_EISR1
static const int GICH_ELSR0
static const int GICV_RPR
void processPostVIntEvent(uint32_t cpu)
Post interrupt to CPU.
#define EndBitUnion(name)
This closes off the class and union started by the above macro.
Copyright (c) 2024 - Pranith Kumar Copyright (c) 2020 Inria All rights reserved.
std::ostream CheckpointOut
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
uint64_t Tick
Tick count type.
int ContextID
Globally unique thread context ID.