dev-amdgpu: Remove cached copy of device memory

This map was originally used for fast access to the GART table. It is no
longer needed as the table has been moved to the AMDGPUVM class. Along
with commit 12ec5f9172301a121a949c622a03a839b0e45d4e which reads
functionally from device memory, this table is no longer needed and is
essentially a duplicate copy of device memory for anything written over
the PCI BAR.

This changeset removes the map entirely which will reduce the memory
footprint of simulations and potentially avoid stale copies of data
when reading over the PCI BAR.

Change-Id: I312ae38f869c6a65e50577b1c33dd055078aaf32
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/63951
Reviewed-by: Matt Sinclair <mattdsinclair.wisc@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Matt Sinclair <mattdsinclair@gmail.com>
Maintainer: Matt Sinclair <mattdsinclair@gmail.com>
diff --git a/src/dev/amdgpu/amdgpu_device.cc b/src/dev/amdgpu/amdgpu_device.cc
index 09e46a5..227e69e 100644
--- a/src/dev/amdgpu/amdgpu_device.cc
+++ b/src/dev/amdgpu/amdgpu_device.cc
@@ -182,9 +182,8 @@
 
     /*
      * Return data for frame reads in priority order: (1) Special addresses
-     * first, ignoring any writes from driver. (2) GART addresses written
-     * to frame_regs in writeFrame. (3) Any other address from device backing
-     * store / abstract memory class functionally.
+     * first, ignoring any writes from driver. (2) Any other address from
+     * device backing store / abstract memory class functionally.
      */
     if (offset == 0xa28000) {
         /*
@@ -198,9 +197,6 @@
         }
 
         pkt->setUintX(regs[pkt->getAddr()], ByteOrder::little);
-    } else if (frame_regs.find(offset) != frame_regs.end()) {
-        /* If the driver wrote something, use that value over the trace. */
-        pkt->setUintX(frame_regs[offset], ByteOrder::little);
     } else {
         /*
          * Read the value from device memory. This must be done functionally
@@ -273,12 +269,10 @@
     Addr aperture_offset = offset - aperture;
 
     // Record the value
-    frame_regs[offset] = pkt->getUintX(ByteOrder::little);
     if (aperture == gpuvm.gartBase()) {
-        frame_regs[aperture_offset] = pkt->getLE<uint32_t>();
-        DPRINTF(AMDGPUDevice, "GART translation %p -> %p\n", aperture_offset,
-            bits(frame_regs[aperture_offset], 48, 12));
         gpuvm.gartTable[aperture_offset] = pkt->getLE<uint32_t>();
+        DPRINTF(AMDGPUDevice, "GART translation %p -> %p\n", aperture_offset,
+                gpuvm.gartTable[aperture_offset]);
     }
 }
 
diff --git a/src/dev/amdgpu/amdgpu_device.hh b/src/dev/amdgpu/amdgpu_device.hh
index fbb0d1c..ac31b95 100644
--- a/src/dev/amdgpu/amdgpu_device.hh
+++ b/src/dev/amdgpu/amdgpu_device.hh
@@ -85,7 +85,6 @@
      * Structures to hold registers, doorbells, and some frame memory
      */
     using GPURegMap = std::unordered_map<uint32_t, uint64_t>;
-    GPURegMap frame_regs;
     GPURegMap regs;
     std::unordered_map<uint32_t, QueueType> doorbells;