Go to the documentation of this file.
38 #include "debug/AMDGPUDevice.hh"
71 uint32_t value = pkt->
getLE<uint32_t>();
77 pkt->
setLE<uint32_t>(1);
83 pkt->
setLE<uint32_t>(1);
96 pkt->
setLE<uint32_t>(1);
130 uint32_t
val = pkt->
getLE<uint32_t>();
134 uint32_t
val = pkt->
getLE<uint32_t>();
138 uint32_t
val = pkt->
getLE<uint32_t>();
142 uint32_t
val = pkt->
getLE<uint32_t>();
146 uint32_t
val = pkt->
getLE<uint32_t>();
150 uint32_t
val = pkt->
getLE<uint32_t>();
154 uint32_t
val = pkt->
getLE<uint32_t>();
158 uint32_t
val = pkt->
getLE<uint32_t>();
178 tlb->invalidateAll();
263 if (next == range.
vaddr)
277 if (next == range.
vaddr)
286 gart_addr += lsb * 7;
290 auto result =
vm->gartTable.find(gart_addr);
291 if (result ==
vm->gartTable.end()) {
294 warn(
"GART translation for %p not found", range.
vaddr);
300 Addr pte = result->second;
302 range.
paddr = (
bits(pte, 47, 12) << 12) | lower_bits;
312 assert(
vm->inMMHUB(range.
vaddr));
315 if (next == range.
vaddr)
330 Addr start =
vm->getPageTableStart(vmid);
332 base, start, walker);
337 Fault fault = walker->startFunctional(
base, paddr, logBytes,
338 BaseMMU::Mode::Read, dummy);
340 fatal(
"User translation fault");
344 const Addr page_size = 1 << logBytes;
346 if (next == range.
vaddr)
void readMMIO(PacketPtr pkt, Addr offset)
#define fatal(...)
This implements a cprintf based fatal() function.
constexpr decltype(nullptr) NoFault
#define mmMMHUB_VM_FB_LOCATION_TOP
void translate(Range &range) const override
Subclasses implement this function to complete TranslationGen.
#define mmMMHUB_VM_INVALIDATE_ENG17_ACK
#define UNSERIALIZE_SCALAR(scalar)
static constexpr int AMDGPU_USER_PAGE_SIZE
#define mmMC_VM_FB_LOCATION_BASE
#define mmMMHUB_VM_FB_LOCATION_BASE
AMDGPUSysVMContext vmContext0
static constexpr int AMDGPU_MMHUB_PAGE_SIZE
#define mmVM_CONTEXT0_PAGE_TABLE_END_ADDR_HI32
Addr gartBase()
Return base address of GART table in framebuffer.
#define mmVM_CONTEXT0_PAGE_TABLE_START_ADDR_LO32
#define mmVM_CONTEXT0_PAGE_TABLE_BASE_ADDR_HI32
bool inAGP(Addr vaddr)
Methods for resolving apertures.
This structure represents a single, contiguous translation, or carries information about whatever fau...
std::vector< AMDGPUVMContext > vmContexts
#define mmVM_CONTEXT0_PAGE_TABLE_END_ADDR_LO32
std::shared_ptr< FaultBase > Fault
void translate(Range &range) const override
Subclasses implement this function to complete TranslationGen.
A Packet is used to encapsulate a transfer between two objects in the memory system (e....
std::vector< VegaISA::GpuTLB * > gpu_tlbs
List of TLBs associated with the GPU device.
Device model for an AMD GPU.
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.
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 mmMC_VM_FB_OFFSET
void registerTLB(VegaISA::GpuTLB *tlb)
Control methods for TLBs associated with the GPU device.
#define SERIALIZE_ARRAY(member, size)
#define mmVM_INVALIDATE_ENG17_ACK
MMIO offsets for graphics register bus manager (GRBM).
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
#define SERIALIZE_SCALAR(scalar)
void translate(Range &range) const override
Subclasses implement this function to complete TranslationGen.
static constexpr int AMDGPU_AGP_PAGE_SIZE
#define mmMC_VM_SYSTEM_APERTURE_HIGH_ADDR
void writeMMIO(PacketPtr pkt, Addr offset)
Addr gartSize()
Return size of GART in number of PTEs.
#define UNSERIALIZE_ARRAY(member, size)
#define mmVM_CONTEXT0_PAGE_TABLE_START_ADDR_HI32
#define mmVM_CONTEXT0_PAGE_TABLE_BASE_ADDR_LO32
static constexpr T roundUp(const T &val, const U &align)
This function is used to align addresses in memory.
void translate(Range &range) const override
Subclasses implement this function to complete TranslationGen.
T getLE() const
Get the data in the packet byte swapped from little endian to host endian.
#define mmMC_VM_SYSTEM_APERTURE_LOW_ADDR
void serialize(CheckpointOut &cp) const override
Serialize an object.
std::ostream CheckpointOut
static constexpr int AMDGPU_VM_COUNT
void setLE(T v)
Set the value in the data pointer to v as little endian.
#define mmMMHUB_VM_INVALIDATE_ENG17_SEM
#define mmMC_VM_FB_LOCATION_TOP
Reference material can be found at the JEDEC website: UFS standard http://www.jedec....
void unserialize(CheckpointIn &cp) override
Unserialize an object.
static constexpr int AMDGPU_GART_PAGE_SIZE
Generated on Wed Jul 13 2022 10:39:18 for gem5 by doxygen 1.8.17