aboutsummaryrefslogtreecommitdiff
path: root/arch/x86_64/src/memory
diff options
context:
space:
mode:
authorFelix Morgner <felix.morgner@ost.ch>2025-12-02 18:49:36 +0100
committerFelix Morgner <felix.morgner@ost.ch>2025-12-02 18:49:36 +0100
commit331c070547634a2096c5e2165559fb0f11ee6330 (patch)
treeb4bb1f0ce663c6eaec81f3d2e5995a94757a32d3 /arch/x86_64/src/memory
parent44d4844ce63e7c00b4028bb918eed5d9fb795578 (diff)
downloadteachos-331c070547634a2096c5e2165559fb0f11ee6330.tar.xz
teachos-331c070547634a2096c5e2165559fb0f11ee6330.zip
kapi: make PLATFORM_*_SIZE constexpr
Diffstat (limited to 'arch/x86_64/src/memory')
-rw-r--r--arch/x86_64/src/memory/paging_root.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86_64/src/memory/paging_root.cpp b/arch/x86_64/src/memory/paging_root.cpp
index a29304e..6b8e1ab 100644
--- a/arch/x86_64/src/memory/paging_root.cpp
+++ b/arch/x86_64/src/memory/paging_root.cpp
@@ -23,7 +23,7 @@ namespace teachos::memory::x86_64
auto paging_root::translate(linear_address address) const -> std::optional<physical_address>
{
- auto offset = address.raw() % PLATFORM_PAGE_SIZE;
+ auto offset = address.raw() % page::size;
return translate(page::containing(address)).transform([offset](auto frame) -> auto {
return physical_address{frame.start_address().raw() + offset};
});