63 #include "debug/Checkpoint.hh"
64 #include "debug/GICV2M.hh"
70 Gicv2mParams::create()
76 Gicv2mFrameParams::create()
82 :
PioDevice(p), pioDelay(p->pio_delay), frames(p->frames), gic(p->gic)
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->
set<uint32_t>((
frames[frame]->spi_base << 16) |
127 DPRINTF(GICV2M,
"GICv2m: Read of unk reg %#x\n", offset);
128 pkt->
set<uint32_t>(0);
147 uint32_t
m = pkt->
get<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)
void set(T v, ByteOrder endian)
Set the value in the data pointer to v using the specified endianness.
int frameFromAddr(Addr a) const
Determine which frame a PIO access lands in.
BaseGic * gic
Gic to which we fire interrupts.
static const int MSI_SETSPI_NSR
static const int FRAME_SIZE
T get(ByteOrder endian) const
Get the data in the packet byte swapped from the specified endianness.
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)
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 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.
virtual AddrRangeList getAddrRanges() const
Return the address ranges used by the Gicv2m This is the set of frame addresses.
Implementiation of a GICv2m MSI shim.
fatal_if(p->js_features.size() > 16,"Too many job slot feature registers specified (%i)\n", p->js_features.size())
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)