changeset 024edfcfcbbf in /z/repo/gem5
details: http://repo.gem5.org/gem5?cmd=changeset;node=024edfcfcbbf
description:
        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:

 src/mem/addr_mapper.cc |  23 ++---------------------
 1 files changed, 2 insertions(+), 21 deletions(-)

diffs (33 lines):

diff -r c0a0593510db -r 024edfcfcbbf src/mem/addr_mapper.cc
--- a/src/mem/addr_mapper.cc    Mon Jan 07 13:05:38 2013 -0500
+++ b/src/mem/addr_mapper.cc    Mon Jan 07 13:05:38 2013 -0500
@@ -265,27 +265,8 @@
 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;
 }
 
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to