41 #ifndef __ARCH_ARM_KVM_GIC_HH__
42 #define __ARCH_ARM_KVM_GIC_HH__
105 void setPPI(
unsigned vcpu,
unsigned ppi);
113 void clearPPI(
unsigned vcpu,
unsigned ppi);
125 uint32_t
data)
override;
169 struct MuxingKvmGicParams;
191 void sendInt(uint32_t num)
override;
192 void clearInt(uint32_t num)
override;
194 void sendPPInt(uint32_t num, uint32_t cpu)
override;
195 void clearPPInt(uint32_t num, uint32_t cpu)
override;
231 #endif // __ARCH_ARM_KVM_GIC_HH__
void writeDistributor(ContextID ctx, Addr daddr, uint32_t data) override
void fromPl390ToKvm()
Multiplexing implementation.
uint32_t getGicReg(unsigned group, unsigned vcpu, unsigned offset)
Get value of GIC register "from" a cpu.
System & system
System this interrupt controller belongs to.
void sendInt(uint32_t num) override
Post an interrupt from a device that is connected to the GIC.
void setPPI(unsigned vcpu, unsigned ppi)
Raise a private peripheral interrupt.
Tick read(PacketPtr pkt) override
Pure virtual function that the device must implement.
void clearPPInt(uint32_t num, uint32_t cpu) override
DrainState
Object drain/handover states.
void copyDistRange(BaseGicRegisters *from, BaseGicRegisters *to, Addr daddr, size_t size)
void serialize(CheckpointOut &cp) const override
Serialize an object.
void loadState(CheckpointIn &cp) override
loadState() is called on each SimObject when restoring from a checkpoint.
void sendPPInt(uint32_t num, uint32_t cpu) override
Interface call for private peripheral interrupts.
void setIntState(unsigned type, unsigned vcpu, unsigned irq, bool high)
Update the kernel's VGIC interrupt state.
void unserialize(CheckpointIn &cp) override
Unserialize an object.
bool validKvmEnvironment() const
Verify gem5 configuration will support KVM emulation.
The AddrRange class encapsulates an address range, and supports a number of tests to check if two ran...
void clearDistRange(BaseGicRegisters *to, Addr daddr, size_t size)
KvmKernelGicV2 & operator=(const KvmKernelGicV2 &&rhs)=delete
Tick write(PacketPtr pkt) override
Pure virtual function that the device must implement.
uint64_t Tick
Tick count type.
void copyCpuRegister(BaseGicRegisters *from, BaseGicRegisters *to, ContextID ctx, Addr daddr)
void clearBankedDistRange(BaseGicRegisters *to, Addr daddr, size_t size)
DrainState drain() override
Notify an object that it needs to drain its state.
void copyBankedDistRange(BaseGicRegisters *from, BaseGicRegisters *to, Addr daddr, size_t size)
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
void clearPPI(unsigned vcpu, unsigned ppi)
Clear a private peripheral interrupt.
A Packet is used to encapsulate a transfer between two objects in the memory system (e...
const AddrRange cpuRange
Address range for the CPU interfaces.
Implementation of a PL390 GIC.
void copyDistRegister(BaseGicRegisters *from, BaseGicRegisters *to, ContextID ctx, Addr daddr)
KvmKernelGicV2 * kernelGic
Kernel GIC device.
void startup() override
startup() is the final initialization call before simulation.
const AddrRange distRange
Address range for the distributor interface.
void writeCpu(ContextID ctx, Addr daddr, uint32_t data) override
KVM in-kernel GIC abstraction.
std::ostream CheckpointOut
KvmVM & vm
KVM VM in the parent system.
virtual ~KvmKernelGicV2()
void drainResume() override
Resume execution after a successful drain.
void copyGicState(BaseGicRegisters *from, BaseGicRegisters *to)
KvmDevice kdev
Kernel interface to the GIC.
KvmKernelGicV2(KvmVM &vm, Addr cpu_addr, Addr dist_addr, unsigned it_lines)
Instantiate a KVM in-kernel GIC model.
void setSPI(unsigned spi)
Raise a shared peripheral interrupt.
void setGicReg(unsigned group, unsigned vcpu, unsigned offset, unsigned value)
Set value of GIC register "from" a cpu.
void clearSPI(unsigned spi)
Clear a shared peripheral interrupt.
void clearInt(uint32_t num) override
Clear an interrupt from a device that is connected to the GIC.
MuxingKvmGic(const MuxingKvmGicParams *p)
int ContextID
Globally unique thread context ID.
uint32_t readDistributor(ContextID ctx, Addr daddr) override
BaseGicRegisters interface.
uint32_t readCpu(ContextID ctx, Addr daddr) override