aboutsummaryrefslogtreecommitdiff
path: root/kernel/kapi
diff options
context:
space:
mode:
authorFelix Morgner <felix.morgner@ost.ch>2026-03-16 10:38:54 +0100
committerFelix Morgner <felix.morgner@ost.ch>2026-03-16 10:38:54 +0100
commit80ae75bf039820ecb332ae1ab86ef6ce4e2675e4 (patch)
tree1bb344657e2516f175c7ce0045f491c8ff811de1 /kernel/kapi
parentd9a653e66d3e7ce3a93219626b281d727e51e2a9 (diff)
downloadteachos-80ae75bf039820ecb332ae1ab86ef6ce4e2675e4.tar.xz
teachos-80ae75bf039820ecb332ae1ab86ef6ce4e2675e4.zip
kapi/memory: support additional address arithmetic
Diffstat (limited to 'kernel/kapi')
-rw-r--r--kernel/kapi/memory.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/kernel/kapi/memory.cpp b/kernel/kapi/memory.cpp
index 767bcd7..b1fb616 100644
--- a/kernel/kapi/memory.cpp
+++ b/kernel/kapi/memory.cpp
@@ -7,7 +7,6 @@
#include <kstd/print>
#include <algorithm>
-#include <bit>
#include <cstddef>
#include <cstdint>
#include <optional>
@@ -130,7 +129,7 @@ namespace kapi::memory
active_page_mapper->map(page, frame, flags);
});
- auto bitmap_ptr = std::bit_cast<std::uint64_t *>(pmm_metadata_base.raw());
+ auto bitmap_ptr = static_cast<std::uint64_t *>(pmm_metadata_base);
auto bitmap = std::span{bitmap_ptr, (bitmap_bytes + sizeof(std::uint64_t) - 1uz) / sizeof(std::uint64_t)};
allocator.emplace(bitmap, frame_count);