34#include "debug/AMDGPUDevice.hh"
58 if (
gpuDevice->getGfxVersion() == GfxVersion::gfx900) {
76 pkt->
setLE<uint32_t>(value);
84 pkt->
setLE<uint32_t>(value);
112 pkt->
setLE<uint32_t>(0x10001);
119 pkt->
setLE<uint32_t>(0x1);
123 pkt->
setLE<uint32_t>(0x80000000);
126 pkt->
setLE<uint32_t>(0x1);
131 if (
gpuDevice->getGfxVersion() == GfxVersion::gfx942) {
132 pkt->
setLE<uint32_t>(2 << 24);
134 pkt->
setLE<uint32_t>(0);
138 pkt->
setLE<uint32_t>(0x200);
162 pkt->
getLE<uint32_t>());
166 pkt->
getLE<uint32_t>());
191 if (pkt->
getLE<uint32_t>() == 0x10000) {
196 0x80000000 + pkt->
getLE<uint32_t>();
201 -
gpuDevice->getVM().getSysAddrRangeLow() + 0xc;
206 -
gpuDevice->getVM().getSysAddrRangeLow() + 0xc;
211 uint16_t context_id =
216 gpuDevice->getVM().setPageTableBaseH(context_id,
217 pkt->
getLE<uint32_t>());
220 gpuDevice->getVM().setPageTableBaseL(context_id,
221 pkt->
getLE<uint32_t>());
224 uint16_t context_id =
229 gpuDevice->getVM().setPageTableStartH(context_id,
230 pkt->
getLE<uint32_t>());
233 gpuDevice->getVM().setPageTableStartL(context_id,
234 pkt->
getLE<uint32_t>());
237 uint16_t context_id =
246 gpuDevice->getVM().setPageTableEndH(context_id,
247 pkt->
getLE<uint32_t>());
250 gpuDevice->getVM().setPageTableEndL(context_id,
251 pkt->
getLE<uint32_t>());
289 }
else if (pkt->
getSize() == 8) {
291 -
gpuDevice->getVM().getSysAddrRangeLow();
293 panic(
"Invalid write size to psp_ring_listen_addr\n");
#define AMDGPU_PCIE_INDEX
#define AMDGPU_PCIE_DATA2
#define MI300X_INV_ENG17_ACK1
#define AMDGPU_MM_INDEX_HI
#define AMDGPU_PCIE_INDEX2
#define MI300X_INV_ENG17_ACK8
#define VEGA10_INV_ENG17_ACK2
#define MI300X_INV_ENG17_ACK10
#define VEGA10_INV_ENG17_ACK1
#define MI100_INV_ENG17_SEM2
#define AMDGPU_MP0_SMN_C2PMSG_81
#define AMDGPU_MP0_SMN_C2PMSG_71
#define MI300X_INV_ENG17_ACK3
#define MI300X_INV_ENG17_ACK9
#define AMDGPU_MP0_SMN_C2PMSG_64
#define MI300X_INV_ENG17_ACK7
#define MI100_INV_ENG17_ACK2
#define MI300X_INV_ENG17_ACK5
#define MI200_INV_ENG17_SEM2
#define MI300X_INV_ENG17_ACK2
#define MI300X_EPF0_STRAP0
#define AMDGPU_MP0_SMN_C2PMSG_35
#define MI300X_INV_ENG17_ACK6
#define AMDGPU_MM_INDEX
MMIO offsets for NBIO.
#define VEGA10_INV_ENG17_SEM1
#define MI300X_INV_ENG17_ACK4
#define MI100_INV_ENG17_ACK3
#define MI100_INV_ENG17_SEM3
#define MI200_INV_ENG17_ACK2
#define AMDGPU_MP0_SMN_C2PMSG_69
#define MI300X_INV_ENG17_ACK11
#define MI200_BIOS_SCRATCH_7
#define VEGA10_INV_ENG17_SEM2
#define AMDGPU_MP1_SMN_C2PMSG_90
#define AMDGPU_MP0_SMN_C2PMSG_70
Device model for an AMD GPU.
uint16_t get_context_from_MI200_regBM_PAGE_TABLE_BASE_ADDR(Addr offset)
bool is_MI200_regBM_PAGE_TABLE_START_ADDR(Addr offset)
void readMMIO(PacketPtr pkt, Addr offset)
Addr psp_ring_listen_addr
std::unordered_map< uint32_t, uint32_t > triggered_reads
void writeMMIO(PacketPtr pkt, Addr offset)
uint16_t get_context_from_MI200_regBM_PAGE_TABLE_END_ADDR(Addr offset)
bool readFrame(PacketPtr pkt, Addr offset)
bool is_MI200_regBM_PAGE_TABLE_END_ADDR(Addr offset)
bool is_MI200_regBM_PAGE_TABLE_BASE_ADDR(Addr offset)
uint16_t get_context_from_MI200_regBM_PAGE_TABLE_START_ADDR(Addr offset)
void writeFrame(PacketPtr pkt, Addr offset)
void setGPUDevice(AMDGPUDevice *gpu_device)
void setUintX(uint64_t w, ByteOrder endian)
Set the value in the word w after truncating it to the length of the packet and then byteswapping it ...
void setLE(T v)
Set the value in the data pointer to v as little endian.
uint64_t getUintX(ByteOrder endian) const
Get the data in the packet byte swapped from the specified endianness and zero-extended to 64 bits.
T getLE() const
Get the data in the packet byte swapped from little endian to host endian.
constexpr T insertBits(T val, unsigned first, unsigned last, B bit_val)
Returns val with bits first to last set to the LSBs of bit_val.
#define panic(...)
This implements a cprintf based panic() function.
Copyright (c) 2024 Arm Limited All rights reserved.
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.