summaryrefslogtreecommitdiff
path: root/src/mem/physical.hh
diff options
context:
space:
mode:
authorAndreas Hansson <andreas.hansson@arm.com>2015-02-16 03:33:37 -0500
committerAndreas Hansson <andreas.hansson@arm.com>2015-02-16 03:33:37 -0500
commit57758ca685fe1a736cfdc214785b04441e83e53a (patch)
tree1a067796f7d86d824814a342464936d49cd82dea /src/mem/physical.hh
parentd0e1b8a19c6d58a49e5288938e9b12f3f10b9f51 (diff)
downloadgem5-57758ca685fe1a736cfdc214785b04441e83e53a.tar.xz
mem: Use the range cache for lookup as well as access
This patch changes the range cache used in the global physical memory to be an iterator so that we can use it not only as part of isMemAddr, but also access and functionalAccess. This matches use-cases where a core is using the atomic non-caching memory mode, and repeatedly calls isMemAddr and access. Linux boot on aarch32, with a single atomic CPU, is now more than 30% faster when using "--fastmem" compared to not using the direct memory access.
Diffstat (limited to 'src/mem/physical.hh')
-rw-r--r--src/mem/physical.hh5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mem/physical.hh b/src/mem/physical.hh
index 51ec1cbd3..b8d26fd4b 100644
--- a/src/mem/physical.hh
+++ b/src/mem/physical.hh
@@ -75,8 +75,9 @@ class PhysicalMemory : public Serializable
// Global address map
AddrRangeMap<AbstractMemory*> addrMap;
- // a mutable cache for the last range that matched an address
- mutable AddrRange rangeCache;
+ // a mutable cache for the last address map iterator that matched
+ // an address
+ mutable AddrRangeMap<AbstractMemory*>::const_iterator rangeCache;
// All address-mapped memories
std::vector<AbstractMemory*> memories;