32#ifndef __DEV_AMDGPU_AMDGPU_VM_HH__
33#define __DEV_AMDGPU_AMDGPU_VM_HH__
54#define mmVM_INVALIDATE_ENG17_ACK 0x08c6
55#define mmVM_CONTEXT0_PAGE_TABLE_BASE_ADDR_LO32 0x08eb
56#define mmVM_CONTEXT0_PAGE_TABLE_BASE_ADDR_HI32 0x08ec
57#define mmVM_CONTEXT0_PAGE_TABLE_START_ADDR_LO32 0x090b
58#define mmVM_CONTEXT0_PAGE_TABLE_START_ADDR_HI32 0x090c
59#define mmVM_CONTEXT0_PAGE_TABLE_END_ADDR_LO32 0x092b
60#define mmVM_CONTEXT0_PAGE_TABLE_END_ADDR_HI32 0x092c
62#define mmMC_VM_FB_OFFSET 0x096b
63#define mmMC_VM_FB_LOCATION_BASE 0x0980
64#define mmMC_VM_FB_LOCATION_TOP 0x0981
65#define mmMC_VM_AGP_TOP 0x0982
66#define mmMC_VM_AGP_BOT 0x0983
67#define mmMC_VM_AGP_BASE 0x0984
68#define mmMC_VM_SYSTEM_APERTURE_LOW_ADDR 0x0985
69#define mmMC_VM_SYSTEM_APERTURE_HIGH_ADDR 0x0986
71#define mmMMHUB_VM_INVALIDATE_ENG17_SEM 0x06e2
72#define mmMMHUB_VM_INVALIDATE_ENG17_REQ 0x06f4
73#define mmMMHUB_VM_INVALIDATE_ENG17_ACK 0x0706
74#define mmMMHUB_VM_FB_LOCATION_BASE 0x082c
75#define mmMMHUB_VM_FB_LOCATION_TOP 0x082d
77#define VEGA10_FB_LOCATION_BASE 0x6a0b0
78#define VEGA10_FB_LOCATION_TOP 0x6a0b4
80#define MI100_MEM_SIZE_REG 0x0378c
81#define MI100_FB_LOCATION_BASE 0x6ac00
82#define MI100_FB_LOCATION_TOP 0x6ac04
84#define MI200_MEM_SIZE_REG 0x0378c
85#define MI200_FB_LOCATION_BASE 0x6b300
86#define MI200_FB_LOCATION_TOP 0x6b304
147 } AMDGPUSysVMContext;
254 warn_once(
"Accessing unsupported MMIO aperture! Assuming NBIO\n");
265 warn_once(
"Accessing unsupported frame apperture!\n");
270 warn_once(
"Accessing unsupported frame apperture!\n");
static constexpr int AMDGPU_VM_COUNT
static constexpr int AMDGPU_MMHUB_PAGE_SIZE
static constexpr int AMDGPU_GART_PAGE_SIZE
static constexpr int AMDGPU_USER_PAGE_SIZE
static constexpr int AMDGPU_AGP_PAGE_SIZE
Translation range generators.
AGPTranslationGen(AMDGPUVM *_vm, Addr vaddr, Addr size)
void translate(Range &range) const override
Subclasses implement this function to complete TranslationGen.
void translate(Range &range) const override
Subclasses implement this function to complete TranslationGen.
GARTTranslationGen(AMDGPUVM *_vm, Addr vaddr, Addr size)
void translate(Range &range) const override
Subclasses implement this function to complete TranslationGen.
MMHUBTranslationGen(AMDGPUVM *_vm, Addr vaddr, Addr size)
UserTranslationGen(AMDGPUVM *_vm, VegaISA::Walker *_walker, int _vmid, Addr vaddr, Addr size)
void translate(Range &range) const override
Subclasses implement this function to complete TranslationGen.
Addr getSysAddrRangeHigh()
std::vector< AMDGPUVMContext > vmContexts
void setMMHUBBase(Addr base)
struct gem5::AMDGPUVM::GEM5_PACKED AMDGPUVMContext
Addr getSysAddrRangeLow()
std::unordered_map< uint64_t, uint64_t > gartTable
Copy of GART table.
bool inAGP(Addr vaddr)
Methods for resolving apertures.
std::vector< VegaISA::GpuTLB * > gpu_tlbs
List of TLBs associated with the GPU device.
void readMMIO(PacketPtr pkt, Addr offset)
Addr getMmioAperture(Addr addr)
void writeMMIO(PacketPtr pkt, Addr offset)
Addr getFrameAperture(Addr addr)
AMDGPUSysVMContext vmContext0
void setPageTableBase(uint16_t vmid, Addr ptBase)
Page table base/start accessors for user VMIDs.
Addr getPageTableBase(uint16_t vmid)
Addr gartBase()
Return base address of GART table in framebuffer.
Addr getPageTableStart(uint16_t vmid)
void unserialize(CheckpointIn &cp) override
Unserialize an object.
Addr gartSize()
Return size of GART in number of PTEs.
void serialize(CheckpointOut &cp) const override
Serialize an object.
void registerTLB(VegaISA::GpuTLB *tlb)
Control methods for TLBs associated with the GPU device.
void setMMHUBTop(Addr top)
A Packet is used to encapsulate a transfer between two objects in the memory system (e....
Basic support for object serialization.
TranslationGen is a base class for a generator object which returns information about address transla...
Reference material can be found at the JEDEC website: UFS standard http://www.jedec....
static constexpr uint32_t MMHUB_SIZE
static constexpr uint32_t SDMA_SIZE
static constexpr uint32_t GFX_BASE
std::ostream CheckpointOut
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
static constexpr uint32_t MMHUB_BASE
static constexpr uint32_t SDMA0_BASE
static constexpr uint32_t GRBM_BASE
static constexpr uint32_t SDMA1_BASE
static constexpr uint32_t IH_BASE
static constexpr uint32_t GRBM_SIZE
static constexpr uint32_t NBIO_BASE
static constexpr uint32_t GFX_SIZE
static constexpr uint32_t IH_SIZE
Declaration of the Packet class.
This structure represents a single, contiguous translation, or carries information about whatever fau...