diff options
Diffstat (limited to 'configs')
-rw-r--r-- | configs/common/FSConfig.py | 8 | ||||
-rw-r--r-- | configs/example/arm/devices.py | 5 |
2 files changed, 6 insertions, 7 deletions
diff --git a/configs/common/FSConfig.py b/configs/common/FSConfig.py index 04793e98e..fc21519ab 100644 --- a/configs/common/FSConfig.py +++ b/configs/common/FSConfig.py @@ -263,11 +263,11 @@ def makeArmSystem(mem_mode, machine_type, num_cpus=1, mdesc=None, self.mem_ranges = [] size_remain = long(Addr(mdesc.mem())) for region in self.realview._mem_regions: - if size_remain > long(region[1]): - self.mem_ranges.append(AddrRange(region[0], size=region[1])) - size_remain = size_remain - long(region[1]) + if size_remain > long(region.size()): + self.mem_ranges.append(region) + size_remain = size_remain - long(region.size()) else: - self.mem_ranges.append(AddrRange(region[0], size=size_remain)) + self.mem_ranges.append(AddrRange(region.start, size=size_remain)) size_remain = 0 break warn("Memory size specified spans more than one region. Creating" \ diff --git a/configs/example/arm/devices.py b/configs/example/arm/devices.py index e2c8be8af..0c08ea23d 100644 --- a/configs/example/arm/devices.py +++ b/configs/example/arm/devices.py @@ -207,9 +207,8 @@ class SimpleSystem(LinuxArmSystem): self.iobridge = Bridge(delay='50ns') # Device DMA -> MEM mem_range = self.realview._mem_regions[0] - max_size = long(mem_range[1]) - assert max_size >= long(Addr(mem_size)) - self.mem_ranges = [ AddrRange(start=mem_range[0], size=mem_size) ] + assert long(mem_range.size()) >= long(Addr(mem_size)) + self.mem_ranges = [ AddrRange(start=mem_range.start, size=mem_size) ] self._caches = caches if self._caches: self.iocache = IOCache(addr_ranges=[self.mem_ranges[0]]) |