Matthew Poremba has submitted this change. ( https://gem5-review.googlesource.com/c/public/gem5/+/53074 )

 (

1 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the submitted one.
 )Change subject: dev-amdgpu: Setup VRAM memories in device
......................................................................

dev-amdgpu: Setup VRAM memories in device

Change-Id: Ic519429f13c4ad1d42997f361cbfe0c6e9aba29a
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/53074
Reviewed-by: Matt Sinclair <mattdsincl...@gmail.com>
Maintainer: Matt Sinclair <mattdsincl...@gmail.com>
Tested-by: kokoro <noreply+kok...@google.com>
---
M src/dev/amdgpu/amdgpu_device.cc
1 file changed, 24 insertions(+), 0 deletions(-)

Approvals:
  Matt Sinclair: Looks good to me, approved; Looks good to me, approved
  kokoro: Regressions pass




diff --git a/src/dev/amdgpu/amdgpu_device.cc b/src/dev/amdgpu/amdgpu_device.cc
index 7ba4f91..4d7aea5 100644
--- a/src/dev/amdgpu/amdgpu_device.cc
+++ b/src/dev/amdgpu/amdgpu_device.cc
@@ -40,6 +40,7 @@
 #include "dev/amdgpu/sdma_engine.hh"
 #include "dev/hsa/hw_scheduler.hh"
 #include "gpu-compute/gpu_command_processor.hh"
+#include "mem/abstract_mem.hh"
 #include "mem/packet.hh"
 #include "mem/packet_access.hh"
 #include "params/AMDGPUDevice.hh"
@@ -61,6 +62,16 @@
     romBin.read((char *)rom.data(), ROM_SIZE);
     romBin.close();

+    // System pointer needs to be explicitly set for device memory since
+    // DRAMCtrl uses it to get (1) cache line size and (2) the mem mode.
+    // Note this means the cache line size is system wide.
+    for (auto& m : p.memories) {
+        m->system(p.system);
+
+        // Add to system's device memory map.
+        p.system->addDeviceMemory(gpuMemMgr->getRequestorID(), m);
+    }
+
     if (config.expansionROM) {
         romRange = RangeSize(config.expansionROM, ROM_SIZE);
     } else {

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/53074
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: Ic519429f13c4ad1d42997f361cbfe0c6e9aba29a
Gerrit-Change-Number: 53074
Gerrit-PatchSet: 20
Gerrit-Owner: Alexandru Duțu <alexandru.d...@amd.com>
Gerrit-Reviewer: Matt Sinclair <mattdsincl...@gmail.com>
Gerrit-Reviewer: Matthew Poremba <matthew.pore...@amd.com>
Gerrit-Reviewer: kokoro <noreply+kok...@google.com>
Gerrit-MessageType: merged
_______________________________________________
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