From 5f695cd3519d8a09a53485c08971f49ed92969ff Mon Sep 17 00:00:00 2001 From: Felix Morgner Date: Fri, 12 Dec 2025 14:11:25 +0100 Subject: x86_64/memory: silence linter warning --- arch/x86_64/CMakeLists.txt | 1 + arch/x86_64/src/memory/recursive_page_mapper.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) 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 - requires(Level > 1uz && Level < 5uz) + requires(Level > 1uz && Level <= PLATFORM_PAGING_LEVELS) auto do_map(recursive_page_table * pml, page page, frame_allocator & allocator, page_mapper::flags flags) { auto index = pml_index(page); -- cgit v1.2.3