61#include "debug/Checkpoint.hh"
62#include "debug/GICV2M.hh"
76 fatal(
"Gicv2m: Frame %d's SPI base (%d) is not in SPI space\n",
81 "a power-of-two number of frames\n");
106 pkt->
setLE<uint32_t>((
frames[frame]->spi_base << 16) |
117 pkt->
setLE<uint32_t>(0);
136 uint32_t
m = pkt->
getLE<uint32_t>();
137 if (
m >=
frames[frame]->spi_base &&
139 DPRINTF(GICV2M,
"GICv2m: Frame %d raising MSI %d\n", frame,
m);
154 for (
int i = 0;
i <
frames.size();
i++) {
virtual void sendInt(uint32_t num)=0
Post an interrupt from a device that is connected to the GIC.
BaseGic * gic
Gic to which we fire interrupts.
unsigned int log2framenum
Count of number of configured frames, as log2(frames)
virtual Tick read(PacketPtr pkt)
A PIO read to the device.
virtual AddrRangeList getAddrRanges() const
Return the address ranges used by the Gicv2m This is the set of frame addresses.
static const int FRAME_SIZE
virtual Tick write(PacketPtr pkt)
A PIO read to the device.
int frameFromAddr(Addr a) const
Determine which frame a PIO access lands in.
const Tick pioDelay
Latency for an MMIO operation.
std::vector< Gicv2mFrame * > frames
A set of configured hardware frames.
static const int MSI_SETSPI_NSR
static const int MSI_TYPER
A Packet is used to encapsulate a transfer between two objects in the memory system (e....
void setLE(T v)
Set the value in the data pointer to v as little endian.
void makeAtomicResponse()
T getLE() const
Get the data in the packet byte swapped from little endian to host endian.
This device is the base class which all devices senstive to an address range inherit from.
Implementiation of a GICv2m MSI shim.
AddrRange RangeSize(Addr start, Addr size)
static constexpr std::enable_if_t< std::is_integral_v< T >, int > floorLog2(T x)
static constexpr bool isPowerOf2(const T &n)
#define fatal_if(cond,...)
Conditional fatal macro that checks the supplied condition and only causes a fatal error if the condi...
#define fatal(...)
This implements a cprintf based fatal() function.
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.
Declaration of the Packet class.