Matthew Poremba has uploaded this change for review. ( https://gem5-review.googlesource.com/c/public/gem5/+/57533 )

Change subject: dev-amdgpu: Add device memory
......................................................................

dev-amdgpu: Add device memory

This adds the actual backing store for the GPU framebuffer.

Change-Id: I22c6dd9bd25b216c4ec99ee472c83d4cb2648efb
---
M src/dev/amdgpu/amdgpu_device.cc
M src/dev/amdgpu/amdgpu_device.hh
2 files changed, 20 insertions(+), 1 deletion(-)



diff --git a/src/dev/amdgpu/amdgpu_device.cc b/src/dev/amdgpu/amdgpu_device.cc
index 73ff971..2ef2c43 100644
--- a/src/dev/amdgpu/amdgpu_device.cc
+++ b/src/dev/amdgpu/amdgpu_device.cc
@@ -56,7 +56,8 @@
     : 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, "")
 {
     // Loading the rom binary dumped from hardware.
     std::ifstream romBin;
@@ -507,6 +508,7 @@
     SERIALIZE_ARRAY(sdma_engs, sizeof(sdma_engs)/sizeof(sdma_engs[0]));

     // Serialize the device memory
+    deviceMem.serializeSection(cp, "deviceMem");
 }

 void
@@ -567,6 +569,7 @@
     }

     // Unserialize the device memory
+    deviceMem.unserializeSection(cp, "deviceMem");
 }

 uint16_t
diff --git a/src/dev/amdgpu/amdgpu_device.hh b/src/dev/amdgpu/amdgpu_device.hh
index 0f2766e..344623f 100644
--- a/src/dev/amdgpu/amdgpu_device.hh
+++ b/src/dev/amdgpu/amdgpu_device.hh
@@ -139,6 +139,11 @@
     // 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);


--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/57533
To unsubscribe, or for help writing mail filters, visit https://gem5-review.googlesource.com/settings

Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: I22c6dd9bd25b216c4ec99ee472c83d4cb2648efb
Gerrit-Change-Number: 57533
Gerrit-PatchSet: 1
Gerrit-Owner: Matthew Poremba <matthew.pore...@amd.com>
Gerrit-MessageType: newchange
_______________________________________________
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

Reply via email to