arch,mem: Remove the default value for page size.
authorGabe Black <gabeblack@google.com>
Sat, 23 Dec 2017 01:14:47 +0000 (17:14 -0800)
committerGabe Black <gabeblack@google.com>
Thu, 11 Jan 2018 06:30:15 +0000 (06:30 +0000)
This breaks one more architecture dependence outside of the ISAs.

Change-Id: I071f9ed73aef78e1cd1752247c183e30854b2d28
Reviewed-on: https://gem5-review.googlesource.com/6982
Maintainer: Gabe Black <gabeblack@google.com>
Reviewed-by: Alexandru Duțu <alexandru.dutu@amd.com>
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Reviewed-by: Brandon Potter <Brandon.Potter@amd.com>
src/arch/alpha/process.cc
src/arch/arm/process.cc
src/arch/mips/process.cc
src/arch/power/process.cc
src/arch/riscv/process.cc
src/arch/sparc/process.cc
src/arch/x86/process.cc
src/mem/multi_level_page_table.hh
src/mem/multi_level_page_table_impl.hh
src/mem/page_table.hh

index 3cc0b0daf891b3530fbf279d3b1972407ff6761e..bcfe36270d07727c404b608366eecd621f2fb6c0 100644 (file)
@@ -49,7 +49,8 @@ using namespace AlphaISA;
 using namespace std;
 
 AlphaProcess::AlphaProcess(ProcessParams *params, ObjectFile *objFile)
-    : Process(params, new FuncPageTable(params->name, params->pid), objFile)
+    : Process(params, new FuncPageTable(params->name, params->pid, PageBytes),
+      objFile)
 {
     fatal_if(!params->useArchPT, "Arch page tables not implemented.");
     Addr brk_point = objFile->dataBase() + objFile->dataSize() +
index b64579a5df12efc3ab09e6ad9eb6843297d8bbe2..5daa54a1fe57a86cbb7a8e7874b33e54ee090e71 100644 (file)
@@ -63,7 +63,8 @@ using namespace ArmISA;
 
 ArmProcess::ArmProcess(ProcessParams *params, ObjectFile *objFile,
                        ObjectFile::Arch _arch)
-    : Process(params, new FuncPageTable(params->name, params->pid), objFile),
+    : Process(params, new FuncPageTable(params->name, params->pid, PageBytes),
+              objFile),
               arch(_arch)
 {
     fatal_if(!params->useArchPT, "Arch page tables not implemented.");
index f3b1108f46ad9bcb79a11307e6a72aed0bf40efb..76f7e869c0f87db507519fe3a48ac9bb79605264 100644 (file)
@@ -50,7 +50,8 @@ using namespace std;
 using namespace MipsISA;
 
 MipsProcess::MipsProcess(ProcessParams *params, ObjectFile *objFile)
-    : Process(params, new FuncPageTable(params->name, params->pid), objFile)
+    : Process(params, new FuncPageTable(params->name, params->pid, PageBytes),
+              objFile)
 {
     fatal_if(!params->useArchPT, "Arch page tables not implemented.");
     // Set up stack. On MIPS, stack starts at the top of kuseg
index 87e5bac9ea484603e272774b2e52d398556595c9..343cd4b4e0bdc56aa2f0c373f97e2395f15e9bac 100644 (file)
@@ -50,7 +50,8 @@ using namespace std;
 using namespace PowerISA;
 
 PowerProcess::PowerProcess(ProcessParams *params, ObjectFile *objFile)
-    : Process(params, new FuncPageTable(params->name, params->pid), objFile)
+    : Process(params, new FuncPageTable(params->name, params->pid, PageBytes),
+              objFile)
 {
     fatal_if(!params->useArchPT, "Arch page tables not implemented.");
     // Set up break point (Top of Heap)
index 88a093a06e4e06c820deada37d8c60efed50c450..44b276a4bbd9c611a6a6e1ab694085366a60ce9a 100644 (file)
@@ -60,7 +60,9 @@ using namespace std;
 using namespace RiscvISA;
 
 RiscvProcess::RiscvProcess(ProcessParams *params, ObjectFile *objFile) :
-        Process(params, new FuncPageTable(params->name, params->pid), objFile)
+        Process(params, new FuncPageTable(params->name, params->pid,
+                                          PageBytes),
+                objFile)
 {
     fatal_if(!params->useArchPT, "Arch page tables not implemented.");
     const Addr stack_base = 0x7FFFFFFFFFFFFFFFL;
index fe91589d001f2ee25995a2a6f76939caa8aaa662..59ef5c4ac6cb6b9ffea298ade0616f4c6c6418ff 100644 (file)
@@ -56,8 +56,9 @@ static const int FirstArgumentReg = 8;
 
 SparcProcess::SparcProcess(ProcessParams *params, ObjectFile *objFile,
                            Addr _StackBias)
-    : Process(params, new FuncPageTable(params->name, params->pid), objFile),
-              StackBias(_StackBias)
+    : Process(params, new FuncPageTable(params->name, params->pid, PageBytes),
+              objFile),
+      StackBias(_StackBias)
 {
     fatal_if(!params->useArchPT, "Arch page tables not implemented.");
     // Initialize these to 0s
index f11cc3438acb12b9cfe975ff6457d408a51846da..bea002d341e21276ff241773da774f0db0538499 100644 (file)
@@ -101,9 +101,10 @@ X86Process::X86Process(ProcessParams *params, ObjectFile *objFile,
     : Process(params, params->useArchPT ?
                       static_cast<PageTableBase *>(
                               new ArchPageTable(params->name, params->pid,
-                                                params->system)) :
+                                                params->system, PageBytes)) :
                       static_cast<PageTableBase *>(
-                              new FuncPageTable(params->name, params->pid)),
+                              new FuncPageTable(params->name, params->pid,
+                                                PageBytes)),
               objFile),
       syscallDescs(_syscallDescs), numSyscallDescs(_numSyscallDescs)
 {
index 402c3712639d3a9b1868364e319723d7399876a7..0e079b730ec8b39280bc1f4bba6250c404b36224 100644 (file)
@@ -140,7 +140,7 @@ class MultiLevelPageTable : public PageTableBase
 
 public:
     MultiLevelPageTable(const std::string &__name, uint64_t _pid,
-                        System *_sys);
+                        System *_sys, Addr pageSize);
     ~MultiLevelPageTable();
 
     void initState(ThreadContext* tc) override;
index 7cd32db162825d0b727434260265d775e0c74bc6..4ff5f5c612b0febb1431e7724604011c0d38af6e 100644 (file)
@@ -46,8 +46,9 @@ using namespace TheISA;
 
 template <class ISAOps>
 MultiLevelPageTable<ISAOps>::MultiLevelPageTable(const std::string &__name,
-                                                 uint64_t _pid, System *_sys)
-    : PageTableBase(__name, _pid), system(_sys),
+                                                 uint64_t _pid, System *_sys,
+                                                 Addr pageSize)
+    : PageTableBase(__name, _pid, pageSize), system(_sys),
     logLevelSize(PageTableLayout),
     numLevels(logLevelSize.size())
 {
index 883b47cdcd0869969df0fbef21af1b0ae657487d..f784b2166b0def31ffbed9e733648da20e8f4fcc 100644 (file)
@@ -73,8 +73,7 @@ class PageTableBase : public Serializable
 
   public:
 
-    PageTableBase(const std::string &__name, uint64_t _pid,
-              Addr _pageSize = TheISA::PageBytes)
+    PageTableBase(const std::string &__name, uint64_t _pid, Addr _pageSize)
             : pageSize(_pageSize), offsetMask(mask(floorLog2(_pageSize))),
               pid(_pid), _name(__name)
     {
@@ -211,8 +210,7 @@ class FuncPageTable : public PageTableBase
 
   public:
 
-    FuncPageTable(const std::string &__name, uint64_t _pid,
-                  Addr _pageSize = TheISA::PageBytes);
+    FuncPageTable(const std::string &__name, uint64_t _pid, Addr _pageSize);
 
     ~FuncPageTable();