Go to the documentation of this file.
32 #ifndef __DEV_AMDGPU_AMDGPU_DEVICE_HH__
33 #define __DEV_AMDGPU_AMDGPU_DEVICE_HH__
45 #include "enums/GfxVersion.hh"
46 #include "params/AMDGPUDevice.hh"
51 class AMDGPUInterruptHandler;
89 using GPURegMap = std::unordered_map<uint32_t, uint64_t>;
101 std::array<uint8_t, ROM_SIZE>
rom;
119 std::unordered_map<uint32_t, SDMAEngine *>
sdmaEngs;
121 std::unordered_map<uint32_t, SDMAEngine *>
sdmaIds;
126 std::unordered_map<uint32_t, sdmaFuncPtr>
sdmaFunc;
136 std::unordered_map<uint16_t, uint16_t>
idMap;
211 std::unordered_map<uint16_t, std::set<int>>&
getUsedVMIDs();
220 #endif // __DEV_AMDGPU_AMDGPU_DEVICE_HH__
Tick read(PacketPtr pkt) override
Pure virtual function that the device must implement.
bool isROM(Addr addr) const
AddrRangeList getAddrRanges() const override
Every PIO device is obliged to provide an implementation that returns the address ranges the device r...
AMDGPUMemoryManager * gpuMemMgr
void writeROM(PacketPtr pkt)
void setDoorbellType(uint32_t offset, QueueType qt)
Set handles to GPU blocks.
SDMAEngine * getSDMAEngine(Addr offset)
SDMAEngine * getSDMAById(int id)
The physical memory encapsulates all memories in the system and provides basic functionality for acce...
void deallocateAllQueues()
bool contains(const Addr &a) const
Determine if the range contains an address.
std::unordered_map< uint32_t, uint64_t > GPURegMap
Structures to hold registers, doorbells, and some frame memory.
void intrPost()
Methods inherited from PciDevice.
AMDGPUNbio nbio
Blocks of the GPU.
std::unordered_map< uint16_t, uint16_t > idMap
std::unordered_map< uint32_t, AddrRange > sdmaMmios
std::unordered_map< Addr, uint16_t > doorbellVMIDMap
void unserialize(CheckpointIn &cp) override
Unserialize an object.
Tick readConfig(PacketPtr pkt) override
Read from the PCI config space data that is stored locally.
void mapDoorbellToVMID(Addr doorbell, uint16_t vmid)
void writeMMIO(PacketPtr pkt, Addr offset)
std::unordered_map< uint32_t, SDMAEngine * > sdmaEngs
AMDGPUDevice(const AMDGPUDeviceParams &p)
AMDGPUInterruptHandler * getIH()
Get handles to GPU blocks.
Tick writeConfig(PacketPtr pkt) override
Write to the PCI config space data that is stored locally.
A Packet is used to encapsulate a transfer between two objects in the memory system (e....
uint64_t Tick
Tick count type.
void setRegVal(uint32_t addr, uint32_t value)
uint16_t allocateVMID(uint16_t pasid)
AMDMMIOReader mmioReader
MMIO reader to populate device registers map.
PCI device, base implementation is only config space.
bool checkpoint_before_mmios
Initial checkpoint support variables.
std::unordered_map< uint32_t, sdmaFuncPtr > sdmaFunc
void readROM(PacketPtr pkt)
Device model for an AMD GPU.
void serialize(CheckpointOut &cp) const override
Checkpoint support.
void dispatchAccess(PacketPtr pkt, bool read)
Convert a PCI packet into a response.
Helper class to read Linux kernel MMIO trace from amdgpu modprobes.
void readFrame(PacketPtr pkt, Addr offset)
Helper methods to handle specific BAR read/writes.
void readDoorbell(PacketPtr pkt, Addr offset)
System DMA Engine class for AMD dGPU.
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
Tick write(PacketPtr pkt) override
Pure virtual function that the device must implement.
uint16_t getVMID(Addr doorbell)
std::unordered_map< uint16_t, std::set< int > > & getUsedVMIDs()
bool haveRegVal(uint32_t addr)
Register value getter/setter.
RequestorID getRequestorID() const
Get the requestorID for the memory manager.
AMDGPUMemoryManager * getMemMgr()
void readMMIO(PacketPtr pkt, Addr offset)
std::unordered_map< uint32_t, SDMAEngine * > sdmaIds
AddrRange romRange
VGA ROM methods.
std::unordered_map< uint16_t, std::set< int > > usedVMIDs
void insertQId(uint16_t vmid, int id)
void deallocateVmid(uint16_t vmid)
void deallocatePasid(uint16_t pasid)
std::array< uint8_t, ROM_SIZE > rom
std::ostream CheckpointOut
memory::PhysicalMemory deviceMem
uint32_t getRegVal(uint32_t addr)
GPUCommandProcessor * CP()
void writeFrame(PacketPtr pkt, Addr offset)
The AddrRange class encapsulates an address range, and supports a number of tests to check if two ran...
Reference material can be found at the JEDEC website: UFS standard http://www.jedec....
void(SDMAEngine::* sdmaFuncPtr)(uint32_t)
PM4PacketProcessor * pm4PktProc
void setSDMAEngine(Addr offset, SDMAEngine *eng)
GfxVersion getGfxVersion() const
std::unordered_map< uint32_t, QueueType > doorbells
RequestorID vramRequestorId()
Methods related to translations and system/device memory.
AMDGPUInterruptHandler * deviceIH
void writeDoorbell(PacketPtr pkt, Addr offset)
Generated on Sun Jul 30 2023 01:56:54 for gem5 by doxygen 1.8.17