gem5 v24.0.0.0
|
#include <amdgpu_vm.hh>
Classes | |
class | AGPTranslationGen |
Translation range generators. More... | |
struct | AMDGPUSysVMContext |
class | GARTTranslationGen |
struct | GEM5_PACKED |
class | MMHUBTranslationGen |
class | UserTranslationGen |
Public Member Functions | |
AMDGPUVM () | |
void | setGPUDevice (AMDGPUDevice *gpu_device) |
Addr | gartBase () |
Return base address of GART table in framebuffer. | |
Addr | gartSize () |
Return size of GART in number of PTEs. | |
bool | inGARTRange (Addr paddr) |
void | readMMIO (PacketPtr pkt, Addr offset) |
void | writeMMIO (PacketPtr pkt, Addr offset) |
bool | inAGP (Addr vaddr) |
Methods for resolving apertures. | |
Addr | getAGPBot () |
Addr | getAGPTop () |
Addr | getAGPBase () |
bool | inMMHUB (Addr vaddr) |
Addr | getMMHUBBase () |
Addr | getMMHUBTop () |
void | setMMHUBBase (Addr base) |
void | setMMHUBTop (Addr top) |
bool | inFB (Addr vaddr) |
Addr | getFBBase () |
Addr | getFBTop () |
Addr | getFBOffset () |
bool | inSys (Addr vaddr) |
Addr | getSysAddrRangeLow () |
Addr | getSysAddrRangeHigh () |
void | setMMIOAperture (mmio_range_t mmio_aperture, AddrRange range) |
const AddrRange & | getMMIOAperture (Addr addr) |
AddrRange | getMMIORange (mmio_range_t mmio_aperture) |
Addr | getFrameAperture (Addr addr) |
void | setPageTableBase (uint16_t vmid, Addr ptBase) |
Page table base/start accessors for user VMIDs. | |
Addr | getPageTableBase (uint16_t vmid) |
Addr | getPageTableStart (uint16_t vmid) |
void | registerTLB (VegaISA::GpuTLB *tlb) |
Control methods for TLBs associated with the GPU device. | |
void | invalidateTLBs () |
void | serialize (CheckpointOut &cp) const override |
Serialize an object. | |
void | unserialize (CheckpointIn &cp) override |
Unserialize an object. | |
Public Member Functions inherited from gem5::Serializable | |
Serializable () | |
virtual | ~Serializable () |
void | serializeSection (CheckpointOut &cp, const char *name) const |
Serialize an object into a new section. | |
void | serializeSection (CheckpointOut &cp, const std::string &name) const |
void | unserializeSection (CheckpointIn &cp, const char *name) |
Unserialize an a child object. | |
void | unserializeSection (CheckpointIn &cp, const std::string &name) |
Public Attributes | |
std::unordered_map< uint64_t, uint64_t > | gartTable |
Copy of GART table. | |
Private Types | |
typedef struct gem5::AMDGPUVM::GEM5_PACKED | AMDGPUVMContext |
typedef gem5::AMDGPUVM::AMDGPUSysVMContext | AMDGPUSysVMContext |
Private Attributes | |
AMDGPUDevice * | gpuDevice |
AMDGPUSysVMContext | vmContext0 |
std::vector< AMDGPUVMContext > | vmContexts |
uint64_t | mmhubBase = 0x0 |
uint64_t | mmhubTop = 0x0 |
std::vector< VegaISA::GpuTLB * > | gpu_tlbs |
List of TLBs associated with the GPU device. | |
std::array< AddrRange, NUM_MMIO_RANGES > | mmioRanges |
Additional Inherited Members | |
Static Public Member Functions inherited from gem5::Serializable | |
static const std::string & | currentSection () |
Gets the fully-qualified name of the active section. | |
static void | generateCheckpointOut (const std::string &cpt_dir, std::ofstream &outstream) |
Generate a checkpoint file so that the serialization can be routed to it. | |
Definition at line 114 of file amdgpu_vm.hh.
|
private |
|
private |
gem5::AMDGPUVM::AMDGPUVM | ( | ) |
Definition at line 46 of file amdgpu_vm.cc.
References gem5::AMDGPU_VM_COUNT, gem5::ArmISA::i, mmioRanges, gem5::NUM_MMIO_RANGES, vmContext0, and vmContexts.
Addr gem5::AMDGPUVM::gartBase | ( | ) |
Return base address of GART table in framebuffer.
Definition at line 87 of file amdgpu_vm.cc.
References gem5::AMDGPUVM::GEM5_PACKED::ptBase, and vmContext0.
Referenced by gem5::SDMAEngine::copyReadData(), getFrameAperture(), inGARTRange(), and gem5::AMDGPUDevice::writeFrame().
Addr gem5::AMDGPUVM::gartSize | ( | ) |
Return size of GART in number of PTEs.
Definition at line 93 of file amdgpu_vm.cc.
References gem5::AMDGPUVM::GEM5_PACKED::ptEnd, gem5::AMDGPUVM::GEM5_PACKED::ptStart, and vmContext0.
Referenced by getFrameAperture(), and inGARTRange().
|
inline |
Definition at line 219 of file amdgpu_vm.hh.
References gem5::AMDGPUVM::AMDGPUSysVMContext::agpBase, and vmContext0.
Referenced by gem5::AMDGPUVM::AGPTranslationGen::translate().
|
inline |
Definition at line 217 of file amdgpu_vm.hh.
References gem5::AMDGPUVM::AMDGPUSysVMContext::agpBot, and vmContext0.
Referenced by gem5::AMDGPUVM::AGPTranslationGen::translate().
|
inline |
Definition at line 218 of file amdgpu_vm.hh.
References gem5::AMDGPUVM::AMDGPUSysVMContext::agpTop, and vmContext0.
|
inline |
Definition at line 239 of file amdgpu_vm.hh.
References gem5::AMDGPUVM::AMDGPUSysVMContext::fbBase, and vmContext0.
|
inline |
Definition at line 241 of file amdgpu_vm.hh.
References gem5::AMDGPUVM::AMDGPUSysVMContext::fbOffset, and vmContext0.
|
inline |
Definition at line 240 of file amdgpu_vm.hh.
References gem5::AMDGPUVM::AMDGPUSysVMContext::fbTop, and vmContext0.
Definition at line 259 of file amdgpu_vm.hh.
References gem5::X86ISA::addr, gartBase(), gartSize(), and warn_once.
Referenced by gem5::AMDGPUDevice::writeFrame().
|
inline |
Definition at line 227 of file amdgpu_vm.hh.
References mmhubBase.
Referenced by gem5::SDMAEngine::getDeviceAddress(), inMMHUB(), gem5::SDMAEngine::ptePde(), and gem5::SDMAEngine::writeReadData().
|
inline |
Definition at line 74 of file amdgpu_vm.cc.
References gem5::ArmISA::i, mmioRanges, gem5::NBIO_MMIO_RANGE, gem5::NUM_MMIO_RANGES, and gem5::ArmISA::offset.
Referenced by gem5::AMDGPUDevice::readMMIO(), and gem5::AMDGPUDevice::writeMMIO().
AddrRange gem5::AMDGPUVM::getMMIORange | ( | mmio_range_t | mmio_aperture | ) |
Definition at line 68 of file amdgpu_vm.cc.
References mmioRanges.
Referenced by gem5::AMDGPUDevice::readMMIO(), and gem5::AMDGPUDevice::writeMMIO().
|
inline |
Definition at line 283 of file amdgpu_vm.hh.
References vmContexts.
Referenced by gem5::GPUCommandProcessor::submitDispatchPkt(), and gem5::VegaISA::GpuTLB::translationReturn().
|
inline |
Definition at line 290 of file amdgpu_vm.hh.
References vmContexts.
|
inline |
Definition at line 251 of file amdgpu_vm.hh.
References gem5::AMDGPUVM::AMDGPUSysVMContext::sysAddrH, and vmContext0.
|
inline |
Definition at line 250 of file amdgpu_vm.hh.
References gem5::AMDGPUVM::AMDGPUSysVMContext::sysAddrL, and vmContext0.
Referenced by gem5::AMDGPUNbio::writeFrame(), and gem5::AMDGPUNbio::writeMMIO().
|
inline |
Methods for resolving apertures.
Definition at line 212 of file amdgpu_vm.hh.
References gem5::AMDGPUVM::AMDGPUSysVMContext::agpBot, gem5::AMDGPUVM::AMDGPUSysVMContext::agpTop, gem5::MipsISA::vaddr, and vmContext0.
Referenced by gem5::PM4PacketProcessor::getGARTAddr(), gem5::SDMAEngine::getGARTAddr(), gem5::AMDGPUVM::AGPTranslationGen::translate(), gem5::PM4PacketProcessor::translate(), and gem5::SDMAEngine::translate().
|
inline |
Definition at line 234 of file amdgpu_vm.hh.
References gem5::AMDGPUVM::AMDGPUSysVMContext::fbBase, gem5::AMDGPUVM::AMDGPUSysVMContext::fbTop, gem5::MipsISA::vaddr, and vmContext0.
|
inline |
Definition at line 194 of file amdgpu_vm.hh.
References gartBase(), and gartSize().
Referenced by gem5::SDMAEngine::copyReadData(), gem5::SDMAEngine::ptePde(), and gem5::SDMAEngine::writeReadData().
|
inline |
Definition at line 222 of file amdgpu_vm.hh.
References getMMHUBBase(), getMMHUBTop(), and gem5::MipsISA::vaddr.
Referenced by gem5::SDMAEngine::copy(), gem5::SDMAEngine::getDeviceAddress(), gem5::SDMAEngine::ptePde(), gem5::SDMAEngine::translate(), and gem5::SDMAEngine::writeReadData().
|
inline |
Definition at line 244 of file amdgpu_vm.hh.
References gem5::AMDGPUVM::AMDGPUSysVMContext::sysAddrH, gem5::AMDGPUVM::AMDGPUSysVMContext::sysAddrL, gem5::MipsISA::vaddr, and vmContext0.
void gem5::AMDGPUVM::invalidateTLBs | ( | ) |
Definition at line 204 of file amdgpu_vm.cc.
References DPRINTF, gpu_tlbs, and gem5::ArmISA::tlb.
Referenced by gem5::PM4PacketProcessor::decodeHeader().
Definition at line 99 of file amdgpu_vm.cc.
References gem5::bits(), DPRINTF, gem5::Packet::getLE(), mmhubBase, mmhubTop, mmMMHUB_VM_FB_LOCATION_BASE, mmMMHUB_VM_FB_LOCATION_TOP, mmMMHUB_VM_INVALIDATE_ENG17_ACK, mmMMHUB_VM_INVALIDATE_ENG17_SEM, mmVM_INVALIDATE_ENG17_ACK, gem5::ArmISA::offset, and gem5::Packet::setLE().
Referenced by gem5::AMDGPUDevice::readMMIO().
void gem5::AMDGPUVM::registerTLB | ( | VegaISA::GpuTLB * | tlb | ) |
Control methods for TLBs associated with the GPU device.
Definition at line 197 of file amdgpu_vm.cc.
References DPRINTF, gpu_tlbs, and gem5::ArmISA::tlb.
|
overridevirtual |
Serialize an object.
Output an object's state into the current checkpoint section.
cp | Checkpoint state |
Implements gem5::Serializable.
Definition at line 214 of file amdgpu_vm.cc.
References gem5::AMDGPUVM::AMDGPUSysVMContext::agpBase, gem5::AMDGPUVM::AMDGPUSysVMContext::agpBot, gem5::AMDGPUVM::AMDGPUSysVMContext::agpTop, gem5::AMDGPU_VM_COUNT, gem5::AMDGPUVM::AMDGPUSysVMContext::fbBase, gem5::AMDGPUVM::AMDGPUSysVMContext::fbOffset, gem5::AMDGPUVM::AMDGPUSysVMContext::fbTop, gartTable, gem5::ArmISA::i, mmhubBase, mmhubTop, gem5::AMDGPUVM::GEM5_PACKED::ptBase, gem5::AMDGPUVM::GEM5_PACKED::ptEnd, gem5::AMDGPUVM::GEM5_PACKED::ptStart, SERIALIZE_ARRAY, SERIALIZE_SCALAR, gem5::AMDGPUVM::AMDGPUSysVMContext::sysAddrH, gem5::AMDGPUVM::AMDGPUSysVMContext::sysAddrL, vmContext0, and vmContexts.
|
inline |
Definition at line 182 of file amdgpu_vm.hh.
References gpuDevice.
|
inline |
Definition at line 230 of file amdgpu_vm.hh.
References gem5::X86ISA::base, and mmhubBase.
Referenced by gem5::AMDGPUDevice::AMDGPUDevice().
|
inline |
Definition at line 231 of file amdgpu_vm.hh.
References mmhubTop.
Referenced by gem5::AMDGPUDevice::AMDGPUDevice().
void gem5::AMDGPUVM::setMMIOAperture | ( | mmio_range_t | mmio_aperture, |
AddrRange | range ) |
Definition at line 62 of file amdgpu_vm.cc.
References mmioRanges.
Referenced by gem5::AMDGPUDevice::AMDGPUDevice().
|
inline |
Page table base/start accessors for user VMIDs.
Definition at line 277 of file amdgpu_vm.hh.
References vmContexts.
Referenced by gem5::PM4PacketProcessor::mapProcess().
|
overridevirtual |
Unserialize an object.
Read an object's state from the current checkpoint section.
cp | Checkpoint state |
Implements gem5::Serializable.
Definition at line 265 of file amdgpu_vm.cc.
References gem5::AMDGPUVM::AMDGPUSysVMContext::agpBase, gem5::AMDGPUVM::AMDGPUSysVMContext::agpBot, gem5::AMDGPUVM::AMDGPUSysVMContext::agpTop, gem5::AMDGPU_VM_COUNT, gem5::AMDGPUVM::AMDGPUSysVMContext::fbBase, gem5::AMDGPUVM::AMDGPUSysVMContext::fbOffset, gem5::AMDGPUVM::AMDGPUSysVMContext::fbTop, gartTable, gem5::ArmISA::i, mmhubBase, mmhubTop, gem5::AMDGPUVM::GEM5_PACKED::ptBase, gem5::AMDGPUVM::GEM5_PACKED::ptEnd, gem5::AMDGPUVM::GEM5_PACKED::ptStart, gem5::AMDGPUVM::AMDGPUSysVMContext::sysAddrH, gem5::AMDGPUVM::AMDGPUSysVMContext::sysAddrL, UNSERIALIZE_ARRAY, UNSERIALIZE_SCALAR, vmContext0, and vmContexts.
Definition at line 135 of file amdgpu_vm.cc.
References gem5::AMDGPUVM::AMDGPUSysVMContext::agpBase, gem5::AMDGPUVM::AMDGPUSysVMContext::agpBot, gem5::AMDGPUVM::AMDGPUSysVMContext::agpTop, gem5::bits(), gem5::AMDGPUVM::AMDGPUSysVMContext::fbBase, gem5::AMDGPUVM::AMDGPUSysVMContext::fbOffset, gem5::AMDGPUVM::AMDGPUSysVMContext::fbTop, gem5::Packet::getLE(), gem5::insertBits(), mmMC_VM_AGP_BASE, mmMC_VM_AGP_BOT, mmMC_VM_AGP_TOP, mmMC_VM_FB_LOCATION_BASE, mmMC_VM_FB_LOCATION_TOP, mmMC_VM_FB_OFFSET, mmMC_VM_SYSTEM_APERTURE_HIGH_ADDR, mmMC_VM_SYSTEM_APERTURE_LOW_ADDR, mmVM_CONTEXT0_PAGE_TABLE_BASE_ADDR_HI32, mmVM_CONTEXT0_PAGE_TABLE_BASE_ADDR_LO32, mmVM_CONTEXT0_PAGE_TABLE_END_ADDR_HI32, mmVM_CONTEXT0_PAGE_TABLE_END_ADDR_LO32, mmVM_CONTEXT0_PAGE_TABLE_START_ADDR_HI32, mmVM_CONTEXT0_PAGE_TABLE_START_ADDR_LO32, gem5::ArmISA::offset, gem5::AMDGPUVM::GEM5_PACKED::ptBaseH, gem5::AMDGPUVM::GEM5_PACKED::ptBaseL, gem5::AMDGPUVM::GEM5_PACKED::ptEndH, gem5::AMDGPUVM::GEM5_PACKED::ptEndL, gem5::AMDGPUVM::GEM5_PACKED::ptStartH, gem5::AMDGPUVM::GEM5_PACKED::ptStartL, gem5::AMDGPUVM::AMDGPUSysVMContext::sysAddrH, gem5::AMDGPUVM::AMDGPUSysVMContext::sysAddrL, gem5::X86ISA::val, and vmContext0.
Referenced by gem5::AMDGPUDevice::writeMMIO().
std::unordered_map<uint64_t, uint64_t> gem5::AMDGPUVM::gartTable |
Copy of GART table.
Typically resides in device memory, however we use a copy in gem5 to simplify the interface.
Definition at line 203 of file amdgpu_vm.hh.
Referenced by gem5::SDMAEngine::copyReadData(), serialize(), unserialize(), and gem5::AMDGPUDevice::writeFrame().
|
private |
List of TLBs associated with the GPU device.
This is used for flushing the TLBs upon a driver request.
Definition at line 175 of file amdgpu_vm.hh.
Referenced by invalidateTLBs(), and registerTLB().
|
private |
Definition at line 117 of file amdgpu_vm.hh.
Referenced by setGPUDevice().
|
private |
Definition at line 168 of file amdgpu_vm.hh.
Referenced by getMMHUBBase(), readMMIO(), serialize(), setMMHUBBase(), and unserialize().
|
private |
Definition at line 169 of file amdgpu_vm.hh.
Referenced by getMMHUBTop(), readMMIO(), serialize(), setMMHUBTop(), and unserialize().
|
private |
Definition at line 177 of file amdgpu_vm.hh.
Referenced by AMDGPUVM(), getMMIOAperture(), getMMIORange(), and setMMIOAperture().
|
private |
Definition at line 163 of file amdgpu_vm.hh.
Referenced by AMDGPUVM(), gartBase(), gartSize(), getAGPBase(), getAGPBot(), getAGPTop(), getFBBase(), getFBOffset(), getFBTop(), getSysAddrRangeHigh(), getSysAddrRangeLow(), inAGP(), inFB(), inSys(), serialize(), unserialize(), and writeMMIO().
|
private |
Definition at line 164 of file amdgpu_vm.hh.
Referenced by AMDGPUVM(), getPageTableBase(), getPageTableStart(), serialize(), setPageTableBase(), and unserialize().