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
262 warn_once(
"Accessing unsupported frame apperture!\n");
267 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
Device model for an AMD GPU.
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()
void setMMIOAperture(mmio_range_t mmio_aperture, AddrRange range)
std::vector< AMDGPUVMContext > vmContexts
std::array< AddrRange, NUM_MMIO_RANGES > mmioRanges
void setMMHUBBase(Addr base)
AddrRange getMMIORange(mmio_range_t mmio_aperture)
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)
const AddrRange & getMMIOAperture(Addr addr)
gem5::AMDGPUVM::AMDGPUSysVMContext AMDGPUSysVMContext
void setGPUDevice(AMDGPUDevice *gpu_device)
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)
bool inGARTRange(Addr paddr)
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)
The AddrRange class encapsulates an address range, and supports a number of tests to check if two ran...
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...
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.
Declaration of the Packet class.
This structure represents a single, contiguous translation, or carries information about whatever fau...