summaryrefslogtreecommitdiff
path: root/src/mem/abstract_mem.cc
diff options
context:
space:
mode:
authorAndreas Hansson <andreas.hansson@arm.com>2012-09-19 06:15:44 -0400
committerAndreas Hansson <andreas.hansson@arm.com>2012-09-19 06:15:44 -0400
commitffb6aec603c38e16ae91ea975c16fc3e8fb337e5 (patch)
treefdf6e12bea9788f46589a9bcb15a8fe67581786f /src/mem/abstract_mem.cc
parentc34df76272c17401955f6daf30ca9c7e7671ae56 (diff)
downloadgem5-ffb6aec603c38e16ae91ea975c16fc3e8fb337e5.tar.xz
AddrRange: Transition from Range<T> to AddrRange
This patch takes the final plunge and transitions from the templated Range class to the more specific AddrRange. In doing so it changes the obvious Range<Addr> to AddrRange, and also bumps the range_map to be AddrRangeMap. In addition to the obvious changes, including the removal of redundant includes, this patch also does some house keeping in preparing for the introduction of address interleaving support in the ranges. The Range class is also stripped of all the functionality that is never used. --HG-- rename : src/base/range.hh => src/base/addr_range.hh rename : src/base/range_map.hh => src/base/addr_range_map.hh
Diffstat (limited to 'src/mem/abstract_mem.cc')
-rw-r--r--src/mem/abstract_mem.cc7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/mem/abstract_mem.cc b/src/mem/abstract_mem.cc
index 775517e3b..ebe4a64b5 100644
--- a/src/mem/abstract_mem.cc
+++ b/src/mem/abstract_mem.cc
@@ -85,9 +85,8 @@ AbstractMemory::AbstractMemory(const Params *p) :
int fd = open(params()->file.c_str(), O_RDONLY);
long _size = lseek(fd, 0, SEEK_END);
if (_size != range.size()) {
- warn("Specified size %d does not match file %s %d\n", range.size(),
- params()->file, _size);
- range = RangeSize(range.start, _size);
+ fatal("Specified size %d does not match file %s %d\n",
+ range.size(), params()->file, _size);
}
lseek(fd, 0, SEEK_SET);
pmemAddr = (uint8_t *)mmap(NULL, roundUp(_size, sysconf(_SC_PAGESIZE)),
@@ -222,7 +221,7 @@ AbstractMemory::regStats()
bwTotal = (bytesRead + bytesWritten) / simSeconds;
}
-Range<Addr>
+AddrRange
AbstractMemory::getAddrRange() const
{
return range;