dev-amdgpu: Add device memory
This adds the actual backing store for the GPU framebuffer. Change-Id: I22c6dd9bd25b216c4ec99ee472c83d4cb2648efb Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/57533 Reviewed-by: Matt Sinclair <mattdsinclair@gmail.com> Maintainer: Matt Sinclair <mattdsinclair@gmail.com> Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
@@ -54,7 +54,8 @@ AMDGPUDevice::AMDGPUDevice(const AMDGPUDeviceParams &p)
|
||||
: PciDevice(p), gpuMemMgr(p.memory_manager), deviceIH(p.device_ih),
|
||||
sdma0(p.sdma0), sdma1(p.sdma1), pm4PktProc(p.pm4_pkt_proc), cp(p.cp),
|
||||
checkpoint_before_mmios(p.checkpoint_before_mmios),
|
||||
init_interrupt_count(0), _lastVMID(0)
|
||||
init_interrupt_count(0), _lastVMID(0),
|
||||
deviceMem(name() + ".deviceMem", p.memories, false, "", false)
|
||||
{
|
||||
// Loading the rom binary dumped from hardware.
|
||||
std::ifstream romBin;
|
||||
@@ -513,6 +514,7 @@ AMDGPUDevice::serialize(CheckpointOut &cp) const
|
||||
SERIALIZE_ARRAY(sdma_engs, sizeof(sdma_engs)/sizeof(sdma_engs[0]));
|
||||
|
||||
// Serialize the device memory
|
||||
deviceMem.serializeSection(cp, "deviceMem");
|
||||
}
|
||||
|
||||
void
|
||||
@@ -573,6 +575,7 @@ AMDGPUDevice::unserialize(CheckpointIn &cp)
|
||||
}
|
||||
|
||||
// Unserialize the device memory
|
||||
deviceMem.unserializeSection(cp, "deviceMem");
|
||||
}
|
||||
|
||||
uint16_t
|
||||
|
||||
@@ -131,6 +131,11 @@ class AMDGPUDevice : public PciDevice
|
||||
// last vmid allocated by map_process PM4 packet
|
||||
uint16_t _lastVMID;
|
||||
|
||||
/*
|
||||
* Backing store for GPU memory / framebuffer / VRAM
|
||||
*/
|
||||
memory::PhysicalMemory deviceMem;
|
||||
|
||||
public:
|
||||
AMDGPUDevice(const AMDGPUDeviceParams &p);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user