diff options
Diffstat (limited to 'src/arch/sparc/tlb_map.hh')
-rw-r--r-- | src/arch/sparc/tlb_map.hh | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/arch/sparc/tlb_map.hh b/src/arch/sparc/tlb_map.hh index 226ef23a1..688daf5b9 100644 --- a/src/arch/sparc/tlb_map.hh +++ b/src/arch/sparc/tlb_map.hh @@ -53,8 +53,15 @@ class TlbMap i = tree.upper_bound(r); if (i == tree.begin()) - // Nothing could match, so return end() - return tree.end(); + if (r.real == i->first.real && + r.partitionId == i->first.partitionId && + i->first.va < r.va + r.size && + i->first.va+i->first.size >= r.va && + (r.real || r.contextId == i->first.contextId)) + return i; + else + // Nothing could match, so return end() + return tree.end(); i--; |