x86: Use the m5 op range in the system.
authorGabe Black <gabeblack@google.com>
Tue, 26 Nov 2019 00:38:22 +0000 (16:38 -0800)
committerGabe Black <gabeblack@google.com>
Fri, 7 Feb 2020 07:39:47 +0000 (07:39 +0000)
Don't hard code a range into the TLB.

Jira Issue: https://gem5.atlassian.net/browse/GEM5-187

Change-Id: I0ead4353672ccf6e3e51ddbb4676be3a09f1136a
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/23182
Maintainer: Gabe Black <gabeblack@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Pouya Fotouhi <pfotouhi@ucdavis.edu>
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
src/arch/x86/X86TLB.py
src/arch/x86/tlb.cc
src/arch/x86/tlb.hh

index 2e61d027f2bfea9fba488dc0c8a1f7aac19e6ca3..b3200ec0b996bc7bc40fd618af80dc2470688de5 100644 (file)
@@ -55,5 +55,6 @@ class X86TLB(BaseTLB):
     cxx_class = 'X86ISA::TLB'
     cxx_header = 'arch/x86/tlb.hh'
     size = Param.Unsigned(64, "TLB size")
+    system = Param.System(Parent.any, "system object")
     walker = Param.X86PagetableWalker(\
             X86PagetableWalker(), "page table walker")
index 2985a8bcb1e4456c700108433a7ea8e400718428..65ed9c01d4f9461130fe70752c522a38003f5b81 100644 (file)
@@ -61,7 +61,7 @@ namespace X86ISA {
 
 TLB::TLB(const Params *p)
     : BaseTLB(p), configAddress(0), size(p->size),
-      tlb(size), lruSeq(0)
+      tlb(size), lruSeq(0), m5opRange(p->system->m5opRange())
 {
     if (!size)
         fatal("TLBs must have a non-zero size.\n");
@@ -229,8 +229,6 @@ TLB::finalizePhysical(const RequestPtr &req,
 {
     Addr paddr = req->getPaddr();
 
-    AddrRange m5opRange(0xFFFF0000, 0x100000000);
-
     if (m5opRange.contains(paddr)) {
         req->setFlags(Request::MMAPPED_IPR | Request::GENERIC_IPR |
                       Request::STRICT_ORDER);
index b969bca9de06f451ca9dddfa7de3d741a26d10e0..21bd6401c7c71de382b316d2ea149b7e09774352 100644 (file)
@@ -100,6 +100,8 @@ namespace X86ISA
         TlbEntryTrie trie;
         uint64_t lruSeq;
 
+        AddrRange m5opRange;
+
         // Statistics
         Stats::Scalar rdAccesses;
         Stats::Scalar wrAccesses;