35#include "debug/AMDGPUDevice.hh"
54 const AMDGPUInterruptHandlerParams &
p)
111 cookie->
pasid = 0x8000;
127 }
else if (
data == 2) {
131 fatal(
"Interrupt Handler DMA event returned bad value: %d\n",
data);
142 uint8_t *dataPtr =
new uint8_t[
sizeof(uint32_t)];
145 std::memcpy(dataPtr, &
regs.
IH_Wptr,
sizeof(uint32_t));
158 uint8_t *dataPtr =
new uint8_t[cookieSize];
159 std::memcpy(dataPtr, cookie, cookieSize);
173 switch (mmio_offset) {
197 if (
bits(pkt->
getLE<uint32_t>(), 28, 28)) {
300 uint32_t ih_wptr_addr_lo;
301 uint32_t ih_wptr_addr_hi;
303 uint32_t ih_doorbellOffset;
Device model for an AMD GPU.
void setDoorbellType(uint32_t offset, QueueType qt, int ip_id=0)
Set handles to GPU blocks.
void intrPost()
Methods inherited from PciDevice.
AMDGPUInterruptHandler * deviceIh
void setCntl(const uint32_t &data)
void setRptr(const uint32_t &data)
void setWptrAddrLo(const uint32_t &data)
AMDGPUInterruptHandler::DmaEvent * dmaEvent
uint32_t getDoorbellOffset() const
AMDGPUInterruptHandler(const AMDGPUInterruptHandlerParams &p)
AddrRangeList getAddrRanges() const override
Every PIO device is obliged to provide an implementation that returns the address ranges the device r...
void unserialize(CheckpointIn &cp) override
Unserialize an object.
void setWptrAddrHi(const uint32_t &data)
void setBase(const uint32_t &data)
void serialize(CheckpointOut &cp) const override
Serialize an object.
void submitWritePointer()
void setDoorbellOffset(const uint32_t &data)
void updateRptr(const uint32_t &data)
void setBaseHi(const uint32_t &data)
void setWptr(const uint32_t &data)
std::queue< AMDGPUInterruptCookie * > interruptQueue
void submitInterruptCookie()
void prepareInterruptCookie(ContextID cntxtId, uint32_t ring_id, uint32_t client_id, uint32_t source_id, unsigned node_id)
void writeMMIO(PacketPtr pkt, Addr mmio_offset)
Methods for setting the values of interrupt handler MMIO registers.
void dmaWrite(Addr addr, int size, Event *event, uint8_t *data, uint32_t sid, uint32_t ssid, Tick delay=0)
A Packet is used to encapsulate a transfer between two objects in the memory system (e....
T getLE() const
Get the data in the packet byte swapped from little endian to host endian.
constexpr T bits(T val, unsigned first, unsigned last)
Extract the bitfield from position 'first' to 'last' (inclusive) from 'val' and right justify it.
#define fatal(...)
This implements a cprintf based fatal() function.
#define mmIH_RB_CNTL
MMIO offsets for interrupt handler.
#define mmIH_RB_WPTR_ADDR_LO
#define mmIH_DOORBELL_RPTR
#define mmIH_RB_WPTR_ADDR_HI
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.
@ SOC15_IH_CLIENTID_SDMA3
@ SOC15_IH_CLIENTID_SDMA4
@ SOC15_IH_CLIENTID_SDMA0
@ SOC15_IH_CLIENTID_GRBM_CP
@ SOC15_IH_CLIENTID_SDMA1
@ SOC15_IH_CLIENTID_SDMA5
@ SOC15_IH_CLIENTID_SDMA2
@ SOC15_IH_CLIENTID_SDMA6
@ SOC15_IH_CLIENTID_SDMA7
int ContextID
Globally unique thread context ID.
#define UNSERIALIZE_SCALAR(scalar)
#define SERIALIZE_SCALAR(scalar)
Struct to contain all interrupt handler related registers.