From 54a9d471faab2b4ab3ef26932957b2e0d496e84e Mon Sep 17 00:00:00 2001 From: Gabe Black Date: Fri, 22 Dec 2017 16:14:03 -0800 Subject: arch,mem: Move page table construction into the arch classes. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This gets rid of an awkward NoArchPageTable class, and also gives the arch a place to inject ISA specific parameters (specifically page size) without having to have TheISA:: in the generic version of these types. Change-Id: I1412f303460d5c43dafdb9b3cd07af81c908a441 Reviewed-on: https://gem5-review.googlesource.com/6981 Reviewed-by: Alexandru Duțu Maintainer: Gabe Black --- src/arch/sparc/process.cc | 7 +++++-- src/arch/sparc/process.hh | 3 --- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'src/arch/sparc') diff --git a/src/arch/sparc/process.cc b/src/arch/sparc/process.cc index da7032f08..fe91589d0 100644 --- a/src/arch/sparc/process.cc +++ b/src/arch/sparc/process.cc @@ -42,6 +42,7 @@ #include "cpu/thread_context.hh" #include "debug/Stack.hh" #include "mem/page_table.hh" +#include "params/Process.hh" #include "sim/aux_vector.hh" #include "sim/process_impl.hh" #include "sim/syscall_return.hh" @@ -53,10 +54,12 @@ using namespace SparcISA; static const int FirstArgumentReg = 8; -SparcProcess::SparcProcess(ProcessParams * params, ObjectFile *objFile, +SparcProcess::SparcProcess(ProcessParams *params, ObjectFile *objFile, Addr _StackBias) - : Process(params, objFile), StackBias(_StackBias) + : Process(params, new FuncPageTable(params->name, params->pid), objFile), + StackBias(_StackBias) { + fatal_if(!params->useArchPT, "Arch page tables not implemented."); // Initialize these to 0s fillStart = 0; spillStart = 0; diff --git a/src/arch/sparc/process.hh b/src/arch/sparc/process.hh index 6a203a400..d7e096758 100644 --- a/src/arch/sparc/process.hh +++ b/src/arch/sparc/process.hh @@ -160,7 +160,4 @@ class Sparc64Process : public SparcProcess void setSyscallArg(ThreadContext *tc, int i, SparcISA::IntReg val); }; -/* No architectural page table defined for this ISA */ -typedef NoArchPageTable ArchPageTable; - #endif // __SPARC_PROCESS_HH__ -- cgit v1.2.3