38#ifndef __ARCH_ARM_KVM_GIC_HH__
39#define __ARCH_ARM_KVM_GIC_HH__
48#include "params/MuxingKvmGicV2.hh"
49#include "params/MuxingKvmGicV3.hh"
110 void setPPI(
unsigned vcpu,
unsigned ppi);
118 void clearPPI(
unsigned vcpu,
unsigned ppi);
153 const MuxingKvmGicV2Params ¶ms);
160 uint32_t
data)
override;
204 const MuxingKvmGicV3Params ¶ms);
206 void init()
override;
211 Addr daddr)
override;
217 Addr daddr, uint32_t
data)
override;
218 void writeCpu(
const ArmISA::Affinity &aff,
229 template <
typename Ret>
240 template <
typename Arg>
265template <
class Types>
284 void sendInt(uint32_t num)
override;
285 void clearInt(uint32_t num)
override;
287 void sendPPInt(uint32_t num, uint32_t cpu)
override;
288 void clearPPInt(uint32_t num, uint32_t cpu)
override;
The AddrRange class encapsulates an address range, and supports a number of tests to check if two ran...
uint32_t readCpu(ContextID ctx, Addr daddr) override
const AddrRange distRange
Address range for the distributor.
void setGicReg(unsigned group, unsigned vcpu, unsigned offset, unsigned value)
Set value of GIC register "from" a cpu.
void writeCpu(ContextID ctx, Addr daddr, uint32_t data) override
uint32_t readDistributor(ContextID ctx, Addr daddr) override
uint32_t getGicReg(unsigned group, unsigned vcpu, unsigned offset)
Get value of GIC register "from" a cpu.
const AddrRange cpuRange
Address range for the CPU interfaces.
void writeDistributor(ContextID ctx, Addr daddr, uint32_t data) override
KvmKernelGicV2(KvmVM &vm, const MuxingKvmGicV2Params ¶ms)
Instantiate a KVM in-kernel GICv2 model.
const AddrRange distRange
Address range for the distributor.
RegVal readCpu(const ArmISA::Affinity &aff, ArmISA::MiscRegIndex misc_reg) override
void writeRedistributor(const ArmISA::Affinity &aff, Addr daddr, uint32_t data) override
const AddrRange redistRange
Address range for the redistributor.
void writeDistributor(Addr daddr, uint32_t data) override
Ret getGicReg(unsigned group, unsigned mpidr, unsigned offset)
Get value of GIC register "from" a cpu.
uint32_t readRedistributor(const ArmISA::Affinity &aff, Addr daddr) override
void writeCpu(const ArmISA::Affinity &aff, ArmISA::MiscRegIndex misc_reg, RegVal data) override
uint32_t readDistributor(Addr daddr) override
void setGicReg(unsigned group, unsigned mpidr, unsigned offset, Arg value)
Set value of GIC register "from" a cpu.
KvmKernelGicV3(KvmVM &vm, const MuxingKvmGicV3Params ¶ms)
Instantiate a KVM in-kernel GICv3 model.
KVM in-kernel GIC abstraction.
void setPPI(unsigned vcpu, unsigned ppi)
Raise a private peripheral interrupt.
KvmKernelGic(const KvmKernelGic &other)=delete
void setSPI(unsigned spi)
Raise a shared peripheral interrupt.
KvmKernelGic(KvmVM &vm, uint32_t dev, unsigned it_lines)
Instantiate a KVM in-kernel GIC model.
void clearPPI(unsigned vcpu, unsigned ppi)
Clear a private peripheral interrupt.
KvmDevice kdev
Kernel interface to the GIC.
void setIntState(unsigned type, unsigned vcpu, unsigned irq, bool high)
Update the kernel's VGIC interrupt state.
void clearSPI(unsigned spi)
Clear a shared peripheral interrupt.
KvmVM & vm
KVM VM in the parent system.
KvmKernelGic(const KvmKernelGic &&other)=delete
KvmKernelGic & operator=(const KvmKernelGic &&rhs)=delete
KvmKernelGic & operator=(const KvmKernelGic &rhs)=delete
System & system
System this interrupt controller belongs to.
void sendInt(uint32_t num) override
Tick write(PacketPtr pkt) override
KvmKernelGic * kernelGic
Kernel GIC device.
MuxingKvmGic(const Params &p)
typename Types::KvmGic KvmGic
bool blockIntUpdate() const override
Tick read(PacketPtr pkt) override
DrainState drain() override
void clearInt(uint32_t num) override
void clearPPInt(uint32_t num, uint32_t cpu) override
void drainResume() override
typename Types::Params Params
typename Types::SimGic SimGic
void fromGicToKvm()
Multiplexing implementation.
void sendPPInt(uint32_t num, uint32_t cpu) override
A Packet is used to encapsulate a transfer between two objects in the memory system (e....
Implementation of a GICv2.
DrainState
Object drain/handover states.
Copyright (c) 2024 - Pranith Kumar Copyright (c) 2020 Inria All rights reserved.
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.
MuxingKvmGicV2Params Params
MuxingKvmGicV3Params Params