From 0824a76b4f7294a74f4728084ca13070a4c8e7da Mon Sep 17 00:00:00 2001 From: Felix Morgner Date: Sat, 29 Aug 2026 10:53:39 +0200 Subject: chore: normalize panic messages --- arch/x86_64/kapi/memory.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'arch/x86_64/kapi/memory.cpp') 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(new_pml4_frame->start_address()); std::construct_at(new_pml4); @@ -232,7 +232,7 @@ namespace kapi::memory auto old_pml4 = static_cast(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(); } -- cgit v1.2.3