aboutsummaryrefslogtreecommitdiff
path: root/arch/x86_64/kapi/memory.cpp
diff options
context:
space:
mode:
authorFelix Morgner <felix.morgner@ost.ch>2026-08-29 10:53:39 +0200
committerFelix Morgner <felix.morgner@ost.ch>2026-08-29 10:53:39 +0200
commit0824a76b4f7294a74f4728084ca13070a4c8e7da (patch)
tree94804942a9119ad8666f7b3cdf6b2f80503a2a93 /arch/x86_64/kapi/memory.cpp
parent1e24d2b3cd4315fff4177c593bcfeef5b354f612 (diff)
downloadkernel-0824a76b4f7294a74f4728084ca13070a4c8e7da.tar.xz
kernel-0824a76b4f7294a74f4728084ca13070a4c8e7da.zip
chore: normalize panic messages
Diffstat (limited to 'arch/x86_64/kapi/memory.cpp')
-rw-r--r--arch/x86_64/kapi/memory.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/arch/x86_64/kapi/memory.cpp b/arch/x86_64/kapi/memory.cpp
index 37b4c7f3..9cf955e5 100644
--- a/arch/x86_64/kapi/memory.cpp
+++ b/arch/x86_64/kapi/memory.cpp
@@ -45,7 +45,7 @@ namespace kapi::memory
auto memory_map = boot::bootstrap_information.mbi->maybe_memory_map();
if (!memory_map)
{
- system::panic("[x86_64] Failed to create early allocator, no memory map available.");
+ system::panic("[ARCH:MEM] Failed to create early allocator, no memory map available.");
}
auto const & mbi = boot::bootstrap_information.mbi;
@@ -157,7 +157,7 @@ namespace kapi::memory
auto next_free_frame = region_based_allocator->next_free_frame();
if (!next_free_frame)
{
- system::panic("[x86_64:MEM] No more free memory!");
+ system::panic("[ARCH:MEM] No more free memory!");
}
std::ranges::for_each(std::views::iota(kapi::memory::frame{}, *next_free_frame),
@@ -196,26 +196,26 @@ namespace kapi::memory
if (is_initialized.test_and_set())
{
- system::panic("[x86_64] Memory management has already been initialized.");
+ system::panic("[ARCH:MEM] Memory management has already been initialized.");
}
- kstd::println("[x86_64:MEM] Enabling additional CPU protection features.");
+ kstd::println("[ARCH:MEM] Enabling additional CPU protection features.");
enable_cpu_protections();
region_based_allocator.emplace(collect_memory_information());
set_frame_allocator(*region_based_allocator);
- kstd::println("[x86_64:MEM] Establishing higher-half direct mapping.");
+ kstd::println("[ARCH:MEM] Establishing higher-half direct mapping.");
establish_higher_half_direct_mapping();
- kstd::println("[x86_64:MEM] Preparing new paging hierarchy.");
+ kstd::println("[ARCH:MEM] Preparing new paging hierarchy.");
auto new_pml4_frame = kapi::memory::allocate_frame();
if (!new_pml4_frame)
{
- system::panic("[x86_64:MEM] Failed to allocate new PML4!");
+ system::panic("[ARCH:MEM] Failed to allocate new PML4!");
}
auto new_pml4 = arch::memory::to_higher_half_pointer<arch::memory::page_table>(new_pml4_frame->start_address());
std::construct_at(new_pml4);
@@ -232,7 +232,7 @@ namespace kapi::memory
auto old_pml4 = static_cast<arch::memory::page_table *>(current_cr3.address());
(*new_pml4)[256] = (*old_pml4)[256];
- kstd::println("[x86_64:MEM] Switching to new paging hierarchy.");
+ kstd::println("[ARCH:MEM] Switching to new paging hierarchy.");
auto cr3 = arch::cpu::cr3::read();
cr3.frame(*new_pml4_frame);
@@ -246,7 +246,7 @@ namespace kapi::memory
init_pmm(frame::containing(physical_address{highest_byte}).number() + 1, handoff_to_kernel_pmm);
- kstd::println("[x86_64:MEM] Releasing bootstrap memory allocators.");
+ kstd::println("[ARCH:MEM] Releasing bootstrap memory allocators.");
region_based_allocator.reset();
}