summaryrefslogtreecommitdiff
path: root/src/arch
diff options
context:
space:
mode:
authorGabe Black <gabeblack@google.com>2018-01-05 23:52:29 -0800
committerGabe Black <gabeblack@google.com>2018-01-20 08:08:06 +0000
commitfd678694ee6bf9defe10d76e01c3e728a25d1871 (patch)
treefae5d677b57395bd48e85b0ab8c37726718f872f /src/arch
parent703662624ca9f6f5454b4d1ac773475c0af1bec5 (diff)
downloadgem5-fd678694ee6bf9defe10d76e01c3e728a25d1871.tar.xz
x86, mem: Get rid of PageTableOps::getBasePtr.
Pass this constant into the page table constructor. Change-Id: Icbf730f18d9dfcfebd10a196f7f799514728b0fb Reviewed-on: https://gem5-review.googlesource.com/7345 Maintainer: Gabe Black <gabeblack@google.com> Reviewed-by: Brandon Potter <Brandon.Potter@amd.com>
Diffstat (limited to 'src/arch')
-rw-r--r--src/arch/x86/pagetable.hh8
-rw-r--r--src/arch/x86/process.cc8
2 files changed, 5 insertions, 11 deletions
diff --git a/src/arch/x86/pagetable.hh b/src/arch/x86/pagetable.hh
index 354fb5a5c..490a2591b 100644
--- a/src/arch/x86/pagetable.hh
+++ b/src/arch/x86/pagetable.hh
@@ -179,14 +179,6 @@ namespace X86ISA
PTE.u = flags & PTE_Supervisor ? 0 : 1;
}
- /** returns the physical memory address of the page table */
- Addr getBasePtr(ThreadContext* tc)
- {
- CR3 cr3 = pageTablePhysAddr;
- DPRINTF(MMU, "CR3: %d\n", cr3);
- return cr3.longPdtb;
- }
-
/** returns the page number out of a page table entry */
Addr getPnum(PageTableEntry PTE)
{
diff --git a/src/arch/x86/process.cc b/src/arch/x86/process.cc
index 627750cbd..0a94ac417 100644
--- a/src/arch/x86/process.cc
+++ b/src/arch/x86/process.cc
@@ -100,9 +100,11 @@ X86Process::X86Process(ProcessParams *params, ObjectFile *objFile,
SyscallDesc *_syscallDescs, int _numSyscallDescs)
: Process(params, params->useArchPT ?
static_cast<EmulationPageTable *>(
- new ArchPageTable(params->name, params->pid,
- params->system, PageBytes,
- PageTableLayout)) :
+ new ArchPageTable(
+ params->name, params->pid,
+ params->system, PageBytes,
+ PageTableLayout,
+ pageTablePhysAddr >> PageShift)) :
new EmulationPageTable(params->name, params->pid,
PageBytes),
objFile),