diff options
Diffstat (limited to 'arch')
| -rw-r--r-- | arch/x86_64/CMakeLists.txt | 1 | ||||
| -rw-r--r-- | arch/x86_64/src/memory/recursive_page_mapper.cpp | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/arch/x86_64/CMakeLists.txt b/arch/x86_64/CMakeLists.txt index 7bd8d07..2a6c878 100644 --- a/arch/x86_64/CMakeLists.txt +++ b/arch/x86_64/CMakeLists.txt @@ -45,6 +45,7 @@ target_sources("x86_64" PUBLIC target_compile_definitions("x86_64" PUBLIC "PLATFORM_PAGE_SIZE=4096" + "PLATFORM_PAGING_LEVELS=4uz" "PLATFORM_FRAME_SIZE=PLATFORM_PAGE_SIZE" ) diff --git a/arch/x86_64/src/memory/recursive_page_mapper.cpp b/arch/x86_64/src/memory/recursive_page_mapper.cpp index fe4fd50..798233a 100644 --- a/arch/x86_64/src/memory/recursive_page_mapper.cpp +++ b/arch/x86_64/src/memory/recursive_page_mapper.cpp @@ -17,7 +17,7 @@ namespace teachos::memory::x86_64 //! added, thus //! still enforcing non-writability and non-execution of the affected page. template<std::size_t Level> - requires(Level > 1uz && Level < 5uz) + requires(Level > 1uz && Level <= PLATFORM_PAGING_LEVELS) auto do_map(recursive_page_table<Level> * pml, page page, frame_allocator & allocator, page_mapper::flags flags) { auto index = pml_index<Level>(page); |
