gem5  v22.0.0.2
Public Member Functions | Protected Member Functions | Private Attributes | List of all members
gem5::KvmKernelGicV3 Class Reference

#include <gic.hh>

Inheritance diagram for gem5::KvmKernelGicV3:
gem5::KvmKernelGic gem5::Gicv3Registers

Public Member Functions

 KvmKernelGicV3 (KvmVM &vm, const MuxingKvmGicV3Params &params)
 Instantiate a KVM in-kernel GICv3 model. More...
 
void init () override
 
uint32_t readDistributor (Addr daddr) override
 
uint32_t readRedistributor (const ArmISA::Affinity &aff, Addr daddr) override
 
RegVal readCpu (const ArmISA::Affinity &aff, ArmISA::MiscRegIndex misc_reg) override
 
void writeDistributor (Addr daddr, uint32_t data) override
 
void writeRedistributor (const ArmISA::Affinity &aff, Addr daddr, uint32_t data) override
 
void writeCpu (const ArmISA::Affinity &aff, ArmISA::MiscRegIndex misc_reg, RegVal data) override
 
- Public Member Functions inherited from gem5::KvmKernelGic
 KvmKernelGic (KvmVM &vm, uint32_t dev, unsigned it_lines)
 Instantiate a KVM in-kernel GIC model. More...
 
virtual ~KvmKernelGic ()
 
 KvmKernelGic (const KvmKernelGic &other)=delete
 
 KvmKernelGic (const KvmKernelGic &&other)=delete
 
KvmKernelGicoperator= (const KvmKernelGic &&rhs)=delete
 
KvmKernelGicoperator= (const KvmKernelGic &rhs)=delete
 
void setSPI (unsigned spi)
 Raise a shared peripheral interrupt. More...
 
void clearSPI (unsigned spi)
 Clear a shared peripheral interrupt. More...
 
void setPPI (unsigned vcpu, unsigned ppi)
 Raise a private peripheral interrupt. More...
 
void clearPPI (unsigned vcpu, unsigned ppi)
 Clear a private peripheral interrupt. More...
 

Protected Member Functions

template<typename Ret >
Ret getGicReg (unsigned group, unsigned mpidr, unsigned offset)
 Get value of GIC register "from" a cpu. More...
 
template<typename Arg >
void setGicReg (unsigned group, unsigned mpidr, unsigned offset, Arg value)
 Set value of GIC register "from" a cpu. More...
 
- Protected Member Functions inherited from gem5::KvmKernelGic
void setIntState (unsigned type, unsigned vcpu, unsigned irq, bool high)
 Update the kernel's VGIC interrupt state. More...
 

Private Attributes

const AddrRange redistRange
 Address range for the redistributor. More...
 
const AddrRange distRange
 Address range for the distributor. More...
 

Additional Inherited Members

- Static Protected Member Functions inherited from gem5::Gicv3Registers
static void copyDistRegister (Gicv3Registers *from, Gicv3Registers *to, Addr daddr)
 
static void copyRedistRegister (Gicv3Registers *from, Gicv3Registers *to, const ArmISA::Affinity &aff, Addr daddr)
 
static void copyCpuRegister (Gicv3Registers *from, Gicv3Registers *to, const ArmISA::Affinity &aff, ArmISA::MiscRegIndex misc_reg)
 
static void clearRedistRegister (Gicv3Registers *to, const ArmISA::Affinity &aff, Addr daddr)
 
static void copyRedistRange (Gicv3Registers *from, Gicv3Registers *to, const ArmISA::Affinity &aff, Addr daddr, size_t size)
 
static void copyDistRange (Gicv3Registers *from, Gicv3Registers *to, Addr daddr, size_t size)
 
static void clearDistRange (Gicv3Registers *to, Addr daddr, size_t size)
 
- Protected Attributes inherited from gem5::KvmKernelGic
KvmVMvm
 KVM VM in the parent system. More...
 
KvmDevice kdev
 Kernel interface to the GIC. More...
 

Detailed Description

Definition at line 191 of file gic.hh.

Constructor & Destructor Documentation

◆ KvmKernelGicV3()

gem5::KvmKernelGicV3::KvmKernelGicV3 ( KvmVM vm,
const MuxingKvmGicV3Params &  params 
)

Instantiate a KVM in-kernel GICv3 model.

This constructor instantiates an in-kernel GICv3 model and wires it up to the virtual memory system.

Parameters
vmKVM VM representing this system
paramsMuxingKvmGicV3 parameters

Definition at line 187 of file gic.cc.

References gem5::KvmKernelGic::kdev, gem5::VegaISA::p, and gem5::KvmDevice::setAttr().

Member Function Documentation

◆ getGicReg()

template<typename Ret >
Ret gem5::KvmKernelGicV3::getGicReg ( unsigned  group,
unsigned  mpidr,
unsigned  offset 
)
protected

Get value of GIC register "from" a cpu.

Parameters
groupDistributor or CPU (KVM_DEV_ARM_VGIC_GRP_{DIST,CPU}_REGS)
mpidrCPU affinity numbers
offsetregister offset

Definition at line 208 of file gic.cc.

References gem5::ArmISA::attr, gem5::KvmDevice::getAttrPtr(), gem5::KvmKernelGic::kdev, gem5::ArmISA::offset, and gem5::X86ISA::reg.

◆ init()

void gem5::KvmKernelGicV3::init ( )
overridevirtual

Reimplemented from gem5::KvmKernelGic.

Definition at line 200 of file gic.cc.

References gem5::KvmKernelGic::kdev, and gem5::KvmDevice::setAttr().

◆ readCpu()

RegVal gem5::KvmKernelGicV3::readCpu ( const ArmISA::Affinity &  aff,
ArmISA::MiscRegIndex  misc_reg 
)
overridevirtual

◆ readDistributor()

uint32_t gem5::KvmKernelGicV3::readDistributor ( Addr  daddr)
overridevirtual

Implements gem5::Gicv3Registers.

Definition at line 237 of file gic.cc.

◆ readRedistributor()

uint32_t gem5::KvmKernelGicV3::readRedistributor ( const ArmISA::Affinity &  aff,
Addr  daddr 
)
overridevirtual

Implements gem5::Gicv3Registers.

Definition at line 243 of file gic.cc.

◆ setGicReg()

template<typename Arg >
void gem5::KvmKernelGicV3::setGicReg ( unsigned  group,
unsigned  mpidr,
unsigned  offset,
Arg  value 
)
protected

Set value of GIC register "from" a cpu.

Parameters
groupDistributor or CPU (KVM_DEV_ARM_VGIC_GRP_{DIST,CPU}_REGS)
mpidrCPU affinity numbers
offsetregister offset
valuevalue to set register to

Definition at line 223 of file gic.cc.

References gem5::ArmISA::attr, gem5::KvmKernelGic::kdev, gem5::ArmISA::offset, gem5::X86ISA::reg, and gem5::KvmDevice::setAttrPtr().

◆ writeCpu()

void gem5::KvmKernelGicV3::writeCpu ( const ArmISA::Affinity &  aff,
ArmISA::MiscRegIndex  misc_reg,
RegVal  data 
)
overridevirtual

◆ writeDistributor()

void gem5::KvmKernelGicV3::writeDistributor ( Addr  daddr,
uint32_t  data 
)
overridevirtual

Implements gem5::Gicv3Registers.

Definition at line 257 of file gic.cc.

References data.

◆ writeRedistributor()

void gem5::KvmKernelGicV3::writeRedistributor ( const ArmISA::Affinity &  aff,
Addr  daddr,
uint32_t  data 
)
overridevirtual

Implements gem5::Gicv3Registers.

Definition at line 263 of file gic.cc.

References data.

Member Data Documentation

◆ distRange

const AddrRange gem5::KvmKernelGicV3::distRange
private

Address range for the distributor.

Definition at line 248 of file gic.hh.

◆ redistRange

const AddrRange gem5::KvmKernelGicV3::redistRange
private

Address range for the redistributor.

Definition at line 246 of file gic.hh.


The documentation for this class was generated from the following files:

Generated on Thu Jul 28 2022 13:33:06 for gem5 by doxygen 1.8.17