63 #include "debug/Checkpoint.hh" 64 #include "debug/GICV2M.hh" 70 Gicv2mParams::create()
76 Gicv2mFrameParams::create()
87 fatal(
"Gicv2m: Frame %d's SPI base (%d) is not in SPI space\n",
92 "a power-of-two number of frames\n");
100 for (
int i = 0;
i <
frames.size();
i++) {
117 pkt->
setLE<uint32_t>((
frames[frame]->spi_base << 16) |
127 DPRINTF(GICV2M,
"GICv2m: Read of unk reg %#x\n", offset);
128 pkt->
setLE<uint32_t>(0);
147 uint32_t
m = pkt->
getLE<uint32_t>();
148 if (m >=
frames[frame]->spi_base &&
149 m < (
frames[frame]->spi_base +
frames[frame]->spi_len)) {
150 DPRINTF(GICV2M,
"GICv2m: Frame %d raising MSI %d\n", frame, m);
154 DPRINTF(GICV2M,
"GICv2m: Write of unk reg %#x\n", offset);
165 for (
int i = 0;
i <
frames.size();
i++) {
AddrRange RangeSize(Addr start, Addr size)
#define fatal(...)
This implements a cprintf based fatal() function.
BaseGic * gic
Gic to which we fire interrupts.
static const int MSI_SETSPI_NSR
static const int FRAME_SIZE
void setLE(T v)
Set the value in the data pointer to v as little endian.
Ultimately this class should be embedded in the Gicv2m class, but this confuses Python as 'Gicv2m::Fr...
virtual void sendInt(uint32_t num)=0
Post an interrupt from a device that is connected to the GIC.
void makeAtomicResponse()
uint64_t Tick
Tick count type.
std::vector< Gicv2mFrame * > frames
A set of configured hardware frames.
virtual Tick read(PacketPtr pkt)
A PIO read to the device.
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...
This device is the base class which all devices senstive to an address range inherit from...
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
virtual AddrRangeList getAddrRanges() const
Return the address ranges used by the Gicv2m This is the set of frame addresses.
virtual Tick write(PacketPtr pkt)
A PIO read to the device.
A Packet is used to encapsulate a transfer between two objects in the memory system (e...
int floorLog2(unsigned x)
Declaration of the Packet class.
int frameFromAddr(Addr a) const
Determine which frame a PIO access lands in.
T getLE() const
Get the data in the packet byte swapped from little endian to host endian.
Implementiation of a GICv2m MSI shim.
const Tick pioDelay
Latency for an MMIO operation.
static const int MSI_TYPER
unsigned int log2framenum
Count of number of configured frames, as log2(frames)