diff options
author | Gabe Black <gabeblack@google.com> | 2018-01-05 23:52:29 -0800 |
---|---|---|
committer | Gabe Black <gabeblack@google.com> | 2018-01-20 08:08:06 +0000 |
commit | fd678694ee6bf9defe10d76e01c3e728a25d1871 (patch) | |
tree | fae5d677b57395bd48e85b0ab8c37726718f872f /src/mem | |
parent | 703662624ca9f6f5454b4d1ac773475c0af1bec5 (diff) | |
download | gem5-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/mem')
-rw-r--r-- | src/mem/multi_level_page_table.hh | 3 | ||||
-rw-r--r-- | src/mem/multi_level_page_table_impl.hh | 10 |
2 files changed, 4 insertions, 9 deletions
diff --git a/src/mem/multi_level_page_table.hh b/src/mem/multi_level_page_table.hh index f71dc0dbc..7cbbd8c0e 100644 --- a/src/mem/multi_level_page_table.hh +++ b/src/mem/multi_level_page_table.hh @@ -140,7 +140,8 @@ class MultiLevelPageTable : public EmulationPageTable public: MultiLevelPageTable(const std::string &__name, uint64_t _pid, System *_sys, Addr pageSize, - const std::vector<uint8_t> &layout); + const std::vector<uint8_t> &layout, + Addr _basePtr); ~MultiLevelPageTable(); void initState(ThreadContext* tc) override; diff --git a/src/mem/multi_level_page_table_impl.hh b/src/mem/multi_level_page_table_impl.hh index 2d7ddc4e4..3356c9ea2 100644 --- a/src/mem/multi_level_page_table_impl.hh +++ b/src/mem/multi_level_page_table_impl.hh @@ -47,10 +47,9 @@ using namespace TheISA; template <class ISAOps> MultiLevelPageTable<ISAOps>::MultiLevelPageTable( const std::string &__name, uint64_t _pid, System *_sys, - Addr pageSize, const std::vector<uint8_t> &layout) + Addr pageSize, const std::vector<uint8_t> &layout, Addr _basePtr) : EmulationPageTable(__name, _pid, pageSize), system(_sys), - logLevelSize(layout), - numLevels(logLevelSize.size()) + basePtr(_basePtr), logLevelSize(layout), numLevels(logLevelSize.size()) { } @@ -63,11 +62,6 @@ template <class ISAOps> void MultiLevelPageTable<ISAOps>::initState(ThreadContext* tc) { - basePtr = pTableISAOps.getBasePtr(tc); - if (basePtr == 0) - basePtr++; - DPRINTF(MMU, "basePtr: %d\n", basePtr); - system->pagePtr = basePtr; /* setting first level of the page table */ |