diff options
author | Andreas Hansson <andreas.hansson@arm.com> | 2013-01-07 13:05:38 -0500 |
---|---|---|
committer | Andreas Hansson <andreas.hansson@arm.com> | 2013-01-07 13:05:38 -0500 |
commit | caf6786ad5a0cc8c0f6262347640ebe49a8ad093 (patch) | |
tree | ba4214fe1c2583c3196a55449e173f4b1216126e /src/mem/addr_mapper.cc | |
parent | 71da1d21578b6f9cf5b43bd4648f313326849533 (diff) | |
download | gem5-caf6786ad5a0cc8c0f6262347640ebe49a8ad093.tar.xz |
mem: Skip address mapper range checks to allow more flexibility
This patch makes the address mapper less stringent about checking the
before and after ranges, i.e. the original and remapped ranges. The
checks were not really necessary, and there are situations when the
previous checks were too strict.
Diffstat (limited to 'src/mem/addr_mapper.cc')
-rw-r--r-- | src/mem/addr_mapper.cc | 23 |
1 files changed, 2 insertions, 21 deletions
diff --git a/src/mem/addr_mapper.cc b/src/mem/addr_mapper.cc index 660848c82..4ee834408 100644 --- a/src/mem/addr_mapper.cc +++ b/src/mem/addr_mapper.cc @@ -265,27 +265,8 @@ RangeAddrMapper::remapAddr(Addr addr) const AddrRangeList RangeAddrMapper::getAddrRanges() const { - AddrRangeList ranges; - AddrRangeList actualRanges = masterPort.getAddrRanges(); - - for (AddrRangeIter r = actualRanges.begin(); r != actualRanges.end(); ++r) { - AddrRange range = *r; - - for (int j = 0; j < originalRanges.size(); ++j) { - if (range.intersects(originalRanges[j])) - fatal("Cannot remap range that intersects the original" - " ranges but are not a subset.\n"); - if (range.isSubset(originalRanges[j])) { - // range is a subset - Addr offset = range.start() - originalRanges[j].start(); - Addr start = range.start() - offset; - ranges.push_back(AddrRange(start, start + range.size() - 1)); - } else { - ranges.push_back(range); - } - } - } - + // Simply return the original ranges as given by the parameters + AddrRangeList ranges(originalRanges.begin(), originalRanges.end()); return ranges; } |