summaryrefslogtreecommitdiff
path: root/src/mem/abstract_mem.hh
diff options
context:
space:
mode:
authorGabe Black <gabeblack@google.com>2019-03-25 18:04:50 -0700
committerGabe Black <gabeblack@google.com>2019-04-14 01:01:47 +0000
commit73e14fb3679e1063012b67a33c69473713a12304 (patch)
treeaea1a0719e681bc2ee5700d6737d655b0af33a6c /src/mem/abstract_mem.hh
parentb2b9285809c47dc7e757c2747a8a5497087b11ec (diff)
downloadgem5-73e14fb3679e1063012b67a33c69473713a12304.tar.xz
mem: Maintain a back door into the AbstractMem's backing store.
The backing store pointer is added to the back door when it's set, assuming that the range isn't interleaved. If it is interleaved, then there isn't a way to get a flat pointer to the backing store. Depending on how the backing store is set up, it may be possible to return a larger backdoor which applies to all interleaved memories at the same time and to avoid problems with interleaving. I'm leaving this as a todo. Change-Id: I0e531c22835ec10954ab39f761b3d87666b59220 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/17668 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com>
Diffstat (limited to 'src/mem/abstract_mem.hh')
-rw-r--r--src/mem/abstract_mem.hh4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mem/abstract_mem.hh b/src/mem/abstract_mem.hh
index 4dd255f5f..cf9ca7439 100644
--- a/src/mem/abstract_mem.hh
+++ b/src/mem/abstract_mem.hh
@@ -49,6 +49,7 @@
#ifndef __MEM_ABSTRACT_MEMORY_HH__
#define __MEM_ABSTRACT_MEMORY_HH__
+#include "mem/backdoor.hh"
#include "mem/mem_object.hh"
#include "params/AbstractMemory.hh"
#include "sim/stats.hh"
@@ -110,6 +111,9 @@ class AbstractMemory : public MemObject
// Pointer to host memory used to implement this memory
uint8_t* pmemAddr;
+ // Backdoor to access this memory.
+ MemBackdoor backdoor;
+
// Enable specific memories to be reported to the configuration table
const bool confTableReported;