diff options
author | Gabe Black <gabeblack@google.com> | 2017-12-22 16:14:03 -0800 |
---|---|---|
committer | Gabe Black <gabeblack@google.com> | 2018-01-11 06:29:58 +0000 |
commit | 54a9d471faab2b4ab3ef26932957b2e0d496e84e (patch) | |
tree | 2fc64af43a35ca47cb2bc06461ff76f8092e1262 /src/arch/mips | |
parent | c2f3f6dbff9b29730da17269397f918742559179 (diff) | |
download | gem5-54a9d471faab2b4ab3ef26932957b2e0d496e84e.tar.xz |
arch,mem: Move page table construction into the arch classes.
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 <alexandru.dutu@amd.com>
Maintainer: Gabe Black <gabeblack@google.com>
Diffstat (limited to 'src/arch/mips')
-rw-r--r-- | src/arch/mips/process.cc | 6 | ||||
-rw-r--r-- | src/arch/mips/process.hh | 4 |
2 files changed, 4 insertions, 6 deletions
diff --git a/src/arch/mips/process.cc b/src/arch/mips/process.cc index 4d0d5e309..f3b1108f4 100644 --- a/src/arch/mips/process.cc +++ b/src/arch/mips/process.cc @@ -39,6 +39,7 @@ #include "cpu/thread_context.hh" #include "debug/Loader.hh" #include "mem/page_table.hh" +#include "params/Process.hh" #include "sim/aux_vector.hh" #include "sim/process.hh" #include "sim/process_impl.hh" @@ -48,9 +49,10 @@ using namespace std; using namespace MipsISA; -MipsProcess::MipsProcess(ProcessParams * params, ObjectFile *objFile) - : Process(params, objFile) +MipsProcess::MipsProcess(ProcessParams *params, ObjectFile *objFile) + : Process(params, new FuncPageTable(params->name, params->pid), objFile) { + fatal_if(!params->useArchPT, "Arch page tables not implemented."); // Set up stack. On MIPS, stack starts at the top of kuseg // user address space. MIPS stack grows down from here Addr stack_base = 0x7FFFFFFF; diff --git a/src/arch/mips/process.hh b/src/arch/mips/process.hh index ed6561c1a..e9e058519 100644 --- a/src/arch/mips/process.hh +++ b/src/arch/mips/process.hh @@ -58,8 +58,4 @@ class MipsProcess : public Process void setSyscallReturn(ThreadContext *tc, SyscallReturn return_value); }; -/* No architectural page table defined for this ISA */ -typedef NoArchPageTable ArchPageTable; - - #endif // __MIPS_PROCESS_HH__ |