41#ifndef __DEV_ARM_GICV3_H__
42#define __DEV_ARM_GICV3_H__
47#include "params/Gicv3.hh"
52class Gicv3CPUInterface;
53class Gicv3Distributor;
54class Gicv3Redistributor;
69 virtual void writeCpu(
const ArmISA::Affinity &aff,
78 const ArmISA::Affinity &aff,
Addr daddr);
81 const ArmISA::Affinity &aff,
84 const ArmISA::Affinity &aff,
Addr daddr);
87 const ArmISA::Affinity &aff,
88 Addr daddr,
size_t size);
91 Addr daddr,
size_t size);
148 void clearInt(uint32_t int_id)
override;
149 void clearPPInt(uint32_t int_id, uint32_t cpu)
override;
157 void init()
override;
163 void sendInt(uint32_t int_id)
override;
164 void sendPPInt(uint32_t int_id, uint32_t cpu)
override;
170 template<
typename... Args>
174 if (
params().reserved_is_res0) {
228 Addr daddr)
override;
234 Addr daddr, uint32_t
data)
override;
235 void writeCpu(
const ArmISA::Affinity &aff,
Base class for ARM GIC implementations.
The AddrRange class encapsulates an address range, and supports a number of tests to check if two ran...
const Params & params() const
static void clearRedistRegister(Gicv3Registers *to, const ArmISA::Affinity &aff, Addr daddr)
static void clearDistRange(Gicv3Registers *to, Addr daddr, size_t size)
static void copyRedistRange(Gicv3Registers *from, Gicv3Registers *to, const ArmISA::Affinity &aff, Addr daddr, size_t size)
virtual void writeCpu(const ArmISA::Affinity &aff, ArmISA::MiscRegIndex misc_reg, RegVal data)=0
virtual void writeDistributor(Addr daddr, uint32_t data)=0
static void copyDistRegister(Gicv3Registers *from, Gicv3Registers *to, Addr daddr)
virtual uint32_t readRedistributor(const ArmISA::Affinity &aff, Addr daddr)=0
static void copyCpuRegister(Gicv3Registers *from, Gicv3Registers *to, const ArmISA::Affinity &aff, ArmISA::MiscRegIndex misc_reg)
static void copyRedistRegister(Gicv3Registers *from, Gicv3Registers *to, const ArmISA::Affinity &aff, Addr daddr)
static void copyDistRange(Gicv3Registers *from, Gicv3Registers *to, Addr daddr, size_t size)
virtual uint32_t readDistributor(Addr daddr)=0
virtual RegVal readCpu(const ArmISA::Affinity &aff, ArmISA::MiscRegIndex misc_reg)=0
virtual void writeRedistributor(const ArmISA::Affinity &aff, Addr daddr, uint32_t data)=0
void writeRedistributor(const ArmISA::Affinity &aff, Addr daddr, uint32_t data) override
void init() override
init() is called after all C++ SimObjects have been created and all ports are connected.
Gicv3Redistributor * getRedistributor(ContextID context_id) const
void clearPPInt(uint32_t int_id, uint32_t cpu) override
void unserialize(CheckpointIn &cp) override
Unserialize an object.
void serialize(CheckpointOut &cp) const override
Serialize an object.
void deassertInt(uint32_t cpu, ArmISA::InterruptTypes int_type)
Tick read(PacketPtr pkt) override
Pure virtual function that the device must implement.
bool supportsVersion(GicVersion version) override
Check if version supported.
Gicv3Distributor * getDistributor() const
void reserved(const char *fmt, Args... args) const
uint32_t readRedistributor(const ArmISA::Affinity &aff, Addr daddr) override
void writeCpu(const ArmISA::Affinity &aff, ArmISA::MiscRegIndex misc_reg, RegVal data) override
Gicv3CPUInterface * getCPUInterface(int cpu_id) const
bool haveAsserted(uint32_t cpu) const
AddrRangeList getAddrRanges() const override
Every PIO device is obliged to provide an implementation that returns the address ranges the device r...
static const int INTID_NONSECURE
void deassertAll(uint32_t cpu)
Gicv3CPUInterface * getCPUInterfaceByAffinity(const ArmISA::Affinity &aff) const
std::vector< Gicv3CPUInterface * > cpuInterfaces
static const int INTID_SPURIOUS
Tick write(PacketPtr pkt) override
Pure virtual function that the device must implement.
Gicv3Redistributor * getRedistributorByAffinity(const ArmISA::Affinity &aff) const
void clearInt(uint32_t int_id) override
Clear an interrupt from a device that is connected to the GIC.
Gicv3Redistributor * getRedistributorByAddr(Addr address) const
static const int INTID_SECURE
uint32_t readDistributor(Addr daddr) override
void postInt(uint32_t cpu, ArmISA::InterruptTypes int_type)
std::vector< Gicv3Redistributor * > redistributors
void writeDistributor(Addr daddr, uint32_t data) override
void sendInt(uint32_t int_id) override
Post an interrupt from a device that is connected to the GIC.
RegVal readCpu(const ArmISA::Affinity &aff, ArmISA::MiscRegIndex misc_reg) override
void copyGicState(Gicv3Registers *from, Gicv3Registers *to)
Gicv3Distributor * distributor
void sendPPInt(uint32_t int_id, uint32_t cpu) override
Interface call for private peripheral interrupts.
A Packet is used to encapsulate a transfer between two objects in the memory system (e....
#define panic(...)
This implements a cprintf based panic() function.
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.