aboutsummaryrefslogtreecommitdiff
path: root/arch/x86_64/kapi
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
parent1e24d2b3cd4315fff4177c593bcfeef5b354f612 (diff)
downloadkernel-0824a76b4f7294a74f4728084ca13070a4c8e7da.tar.xz
kernel-0824a76b4f7294a74f4728084ca13070a4c8e7da.zip
chore: normalize panic messages
Diffstat (limited to 'arch/x86_64/kapi')
-rw-r--r--arch/x86_64/kapi/boot_modules.cpp2
-rw-r--r--arch/x86_64/kapi/cpu.cpp2
-rw-r--r--arch/x86_64/kapi/devices.cpp6
-rw-r--r--arch/x86_64/kapi/memory.cpp18
4 files changed, 14 insertions, 14 deletions
diff --git a/arch/x86_64/kapi/boot_modules.cpp b/arch/x86_64/kapi/boot_modules.cpp
index 607aca4e..95ed0287 100644
--- a/arch/x86_64/kapi/boot_modules.cpp
+++ b/arch/x86_64/kapi/boot_modules.cpp
@@ -25,7 +25,7 @@ namespace kapi::boot_modules
auto init(kapi::devices::bus & bus) -> void
{
- kstd::println("[x86_64:BOOT_MODULES] Attaching boot modules.");
+ kstd::println("[ARCH:BOOT_MODULES] Attaching boot modules.");
auto modules = boot::bootstrap_information.mbi->modules();
diff --git a/arch/x86_64/kapi/cpu.cpp b/arch/x86_64/kapi/cpu.cpp
index 2bec841c..11a12656 100644
--- a/arch/x86_64/kapi/cpu.cpp
+++ b/arch/x86_64/kapi/cpu.cpp
@@ -15,7 +15,7 @@ namespace kapi::cpu
if (is_initialized.test_and_set())
{
- system::panic("[x86_64] CPU has already been initialized.");
+ system::panic("[ARCH:CPU] CPU has already been initialized.");
}
arch::cpu::initialize_descriptors();
diff --git a/arch/x86_64/kapi/devices.cpp b/arch/x86_64/kapi/devices.cpp
index 1e2fedd6..39dbc010 100644
--- a/arch/x86_64/kapi/devices.cpp
+++ b/arch/x86_64/kapi/devices.cpp
@@ -39,7 +39,7 @@ namespace kapi::devices
for (auto driver : descriptors)
{
auto instance = driver->make_instance();
- kstd::println("[x86_64:DRV] registering driver '{}' ({})", instance->name(), driver->name());
+ kstd::println("[ARCH:DRV] registering driver '{}' ({})", instance->name(), driver->name());
kapi::devices::driver_registry::get().add(std::move(instance));
}
}
@@ -54,7 +54,7 @@ namespace kapi::devices
{
if (!cpu_bus)
{
- system::panic("[x86_64:DEV] The CPU topology has not yet been initialized!");
+ system::panic("[ARCH:DEV] The CPU topology has not yet been initialized!");
}
return cpu_bus;
@@ -64,7 +64,7 @@ namespace kapi::devices
{
if (cpu_bus)
{
- system::panic("[x86_64:DEV] The CPU topology has already been initialized!");
+ system::panic("[ARCH:DEV] The CPU topology has already been initialized!");
}
cpu_bus = kstd::make_shared<arch::bus::cpu>();
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();
}