summaryrefslogtreecommitdiff
path: root/src/arch/x86
diff options
context:
space:
mode:
Diffstat (limited to 'src/arch/x86')
-rw-r--r--src/arch/x86/process.cc13
-rw-r--r--src/arch/x86/process.hh16
2 files changed, 18 insertions, 11 deletions
diff --git a/src/arch/x86/process.cc b/src/arch/x86/process.cc
index 1ad1315da..f11cc3438 100644
--- a/src/arch/x86/process.cc
+++ b/src/arch/x86/process.cc
@@ -60,6 +60,7 @@
#include "debug/Stack.hh"
#include "mem/multi_level_page_table.hh"
#include "mem/page_table.hh"
+#include "params/Process.hh"
#include "sim/aux_vector.hh"
#include "sim/process_impl.hh"
#include "sim/syscall_desc.hh"
@@ -95,10 +96,16 @@ static const int ArgumentReg32[] = {
static const int NumArgumentRegs32 M5_VAR_USED =
sizeof(ArgumentReg) / sizeof(const int);
-X86Process::X86Process(ProcessParams * params, ObjectFile *objFile,
+X86Process::X86Process(ProcessParams *params, ObjectFile *objFile,
SyscallDesc *_syscallDescs, int _numSyscallDescs)
- : Process(params, objFile), syscallDescs(_syscallDescs),
- numSyscallDescs(_numSyscallDescs)
+ : Process(params, params->useArchPT ?
+ static_cast<PageTableBase *>(
+ new ArchPageTable(params->name, params->pid,
+ params->system)) :
+ static_cast<PageTableBase *>(
+ new FuncPageTable(params->name, params->pid)),
+ objFile),
+ syscallDescs(_syscallDescs), numSyscallDescs(_numSyscallDescs)
{
}
diff --git a/src/arch/x86/process.hh b/src/arch/x86/process.hh
index 3eb9620c9..e5e18570d 100644
--- a/src/arch/x86/process.hh
+++ b/src/arch/x86/process.hh
@@ -59,6 +59,14 @@ namespace X86ISA
class X86Process : public Process
{
protected:
+ /**
+ * Declaration of architectural page table for x86.
+ *
+ * These page tables are stored in system memory and respect x86
+ * specification.
+ */
+ typedef MultiLevelPageTable<PageTableOps> ArchPageTable;
+
Addr _gdtStart;
Addr _gdtSize;
@@ -189,14 +197,6 @@ namespace X86ISA
Process *process, TheISA::IntReg flags) override;
};
- /**
- * Declaration of architectural page table for x86.
- *
- * These page tables are stored in system memory and respect x86
- * specification.
- */
- typedef MultiLevelPageTable<PageTableOps> ArchPageTable;
-
}
#endif // __ARCH_X86_PROCESS_HH__