From b4c9996d894118be04cdf4ed793b35a1d5001942 Mon Sep 17 00:00:00 2001 From: Brandon Potter Date: Fri, 18 Oct 2019 14:43:14 -0400 Subject: base,tests: Expanded GTests for addr_range.hh These tests assume the "end address" is not included in the range. This exposed some bugs in addr_range.hh which have been fixed. Where appropriate code comments in addr_range.hh have been extended to improve understanding of the class's behavior. Hard-coded AddrRange values in the project have been updated to take into account that end address is now exclusive. The python params.py interface has been updated to conform to this new standard. Change-Id: Idd1e75d5771d198c4b8142b28de0f3a6e9007a52 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/22427 Maintainer: Bobby R. Bruce Reviewed-by: Nikos Nikoleris Tested-by: kokoro --- src/arch/x86/tlb.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/arch/x86') diff --git a/src/arch/x86/tlb.cc b/src/arch/x86/tlb.cc index 84965b881..2985a8bcb 100644 --- a/src/arch/x86/tlb.cc +++ b/src/arch/x86/tlb.cc @@ -229,7 +229,7 @@ TLB::finalizePhysical(const RequestPtr &req, { Addr paddr = req->getPaddr(); - AddrRange m5opRange(0xFFFF0000, 0xFFFFFFFF); + AddrRange m5opRange(0xFFFF0000, 0x100000000); if (m5opRange.contains(paddr)) { req->setFlags(Request::MMAPPED_IPR | Request::GENERIC_IPR | @@ -241,7 +241,7 @@ TLB::finalizePhysical(const RequestPtr &req, LocalApicBase localApicBase = tc->readMiscRegNoEffect(MISCREG_APIC_BASE); AddrRange apicRange(localApicBase.base * PageBytes, - (localApicBase.base + 1) * PageBytes - 1); + (localApicBase.base + 1) * PageBytes); if (apicRange.contains(paddr)) { // The Intel developer's manuals say the below restrictions apply, -- cgit v1.2.3