summaryrefslogtreecommitdiff
path: root/configs/common
diff options
context:
space:
mode:
authorAndreas Hansson <andreas.hansson@arm.com>2012-09-19 06:15:41 -0400
committerAndreas Hansson <andreas.hansson@arm.com>2012-09-19 06:15:41 -0400
commitfccbf8bb45723adb07ebadd52e548e1bcd2cc44a (patch)
treedfd9d5c8ecfcec158db461f85938b9fee0e3b1c2 /configs/common
parent33c904e0a560be8c5f9aedaba9940ad0df52d81c (diff)
downloadgem5-fccbf8bb45723adb07ebadd52e548e1bcd2cc44a.tar.xz
AddrRange: Simplify AddrRange params Python hierarchy
This patch simplifies the Range object hierarchy in preparation for an address range class that also allows striping (e.g. selecting a few bits as matching in addition to the range). To extend the AddrRange class to an AddrRegion, the first step is to simplify the hierarchy such that we can make it as lean as possible before adding the new functionality. The only class using Range and MetaRange is AddrRange, and the three classes are now collapsed into one.
Diffstat (limited to 'configs/common')
-rw-r--r--configs/common/FSConfig.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/configs/common/FSConfig.py b/configs/common/FSConfig.py
index 0515fc53a..657b9bcaa 100644
--- a/configs/common/FSConfig.py
+++ b/configs/common/FSConfig.py
@@ -519,7 +519,9 @@ def makeLinuxX86System(mem_mode, numCPUs = 1, mdesc = None, Ruby = False):
# We assume below that there's at least 1MB of memory. We'll require 2
# just to avoid corner cases.
- assert(self.physmem.range.second.getValue() >= 0x200000)
+ phys_mem_size = sum(map(lambda mem: mem.range.size(),
+ self.memories.unproxy(self)))
+ assert(phys_mem_size >= 0x200000)
self.e820_table.entries = \
[
@@ -527,7 +529,7 @@ def makeLinuxX86System(mem_mode, numCPUs = 1, mdesc = None, Ruby = False):
X86E820Entry(addr = 0, size = '1MB', range_type = 2),
# Mark the rest as available
X86E820Entry(addr = 0x100000,
- size = '%dB' % (self.physmem.range.second - 0x100000 + 1),
+ size = '%dB' % (phys_mem_size - 0x100000),
range_type = 1)
]