diff options
| author | Felix Morgner <felix.morgner@ost.ch> | 2026-08-29 10:53:39 +0200 |
|---|---|---|
| committer | Felix Morgner <felix.morgner@ost.ch> | 2026-08-29 10:53:39 +0200 |
| commit | 0824a76b4f7294a74f4728084ca13070a4c8e7da (patch) | |
| tree | 94804942a9119ad8666f7b3cdf6b2f80503a2a93 /arch | |
| parent | 1e24d2b3cd4315fff4177c593bcfeef5b354f612 (diff) | |
| download | kernel-0824a76b4f7294a74f4728084ca13070a4c8e7da.tar.xz kernel-0824a76b4f7294a74f4728084ca13070a4c8e7da.zip | |
chore: normalize panic messages
Diffstat (limited to 'arch')
| -rw-r--r-- | arch/x86_64/arch/bus/cpu.cpp | 2 | ||||
| -rw-r--r-- | arch/x86_64/arch/cpu/initialization.cpp | 4 | ||||
| -rw-r--r-- | arch/x86_64/arch/cpu/interrupts.cpp | 6 | ||||
| -rw-r--r-- | arch/x86_64/arch/devices/init.cpp | 4 | ||||
| -rw-r--r-- | arch/x86_64/arch/drivers/cpu/lapic.cpp | 6 | ||||
| -rw-r--r-- | arch/x86_64/arch/memory/higher_half_mapper.cpp | 4 | ||||
| -rw-r--r-- | arch/x86_64/arch/memory/kernel_mapper.cpp | 6 | ||||
| -rw-r--r-- | arch/x86_64/kapi/boot_modules.cpp | 2 | ||||
| -rw-r--r-- | arch/x86_64/kapi/cpu.cpp | 2 | ||||
| -rw-r--r-- | arch/x86_64/kapi/devices.cpp | 6 | ||||
| -rw-r--r-- | arch/x86_64/kapi/memory.cpp | 18 |
11 files changed, 30 insertions, 30 deletions
diff --git a/arch/x86_64/arch/bus/cpu.cpp b/arch/x86_64/arch/bus/cpu.cpp index 4b9edffc..a21d910d 100644 --- a/arch/x86_64/arch/bus/cpu.cpp +++ b/arch/x86_64/arch/bus/cpu.cpp @@ -36,7 +36,7 @@ namespace arch::bus auto madt = kapi::acpi::get_table<::acpi::table_signature_v<::acpi::madt>>(); if (!madt) { - kstd::println("[x86_64:BUS] Failed to find ACPI APIC table"); + kstd::println("[ARCH:BUS] Failed to find ACPI APIC table"); return; } diff --git a/arch/x86_64/arch/cpu/initialization.cpp b/arch/x86_64/arch/cpu/initialization.cpp index 49870eb7..83493fe3 100644 --- a/arch/x86_64/arch/cpu/initialization.cpp +++ b/arch/x86_64/arch/cpu/initialization.cpp @@ -123,10 +123,10 @@ namespace arch::cpu gdt_user_code_descriptor, gdt_user_data_descriptor, tss_descriptor, }; - kstd::println("[x86_64:SYS] Reloading Global Descriptor Table."); + kstd::println("[ARCH:SYS] Reloading Global Descriptor Table."); gdt.load(1, 2); - kstd::println("[x86_64:SYS] Initializing Interrupt Descriptor Table."); + kstd::println("[ARCH:SYS] Initializing Interrupt Descriptor Table."); auto static idt = interrupt_descriptor_table{}; idt.load(); } diff --git a/arch/x86_64/arch/cpu/interrupts.cpp b/arch/x86_64/arch/cpu/interrupts.cpp index 99186e2d..c825e8ab 100644 --- a/arch/x86_64/arch/cpu/interrupts.cpp +++ b/arch/x86_64/arch/cpu/interrupts.cpp @@ -141,11 +141,11 @@ namespace arch::cpu if (has_error_code(static_cast<exception>(number))) { kstd::println(kstd::print_sink::stderr, - "[x86_64:CPU] Unhandled exception number {:#04x} received with code {:#04x}", number, code); + "[ARCH:CPU] Unhandled exception number {:#04x} received with code {:#04x}", number, code); } else { - kstd::println(kstd::print_sink::stderr, "[x86_64:CPU] Unhandled exception number {:#04x} received", number); + kstd::println(kstd::print_sink::stderr, "[ARCH:CPU] Unhandled exception number {:#04x} received", number); } } } @@ -155,7 +155,7 @@ namespace arch::cpu if (kapi::interrupts::dispatch(irq_number) == kapi::interrupts::status::unhandled) { - kstd::println(kstd::print_sink::stderr, "[x86_64:CPU] Unhandled interrupt {:#04x} (IRQ{})", number, + kstd::println(kstd::print_sink::stderr, "[ARCH:CPU] Unhandled interrupt {:#04x} (IRQ{})", number, irq_number); } diff --git a/arch/x86_64/arch/devices/init.cpp b/arch/x86_64/arch/devices/init.cpp index 9c20d413..639e8870 100644 --- a/arch/x86_64/arch/devices/init.cpp +++ b/arch/x86_64/arch/devices/init.cpp @@ -46,7 +46,7 @@ namespace arch::devices { if (kapi::acpi::init(*acpi_root_pointer)) { - kstd::println("[x86_64:DEV] ACPI subsystem initialized."); + kstd::println("[ARCH:DEV] ACPI subsystem initialized."); } } @@ -55,7 +55,7 @@ namespace arch::devices auto init_legacy_devices() -> void { - kstd::println("[x86_64:DEV] Initializing ISA bus..."); + kstd::println("[ARCH:DEV] Initializing ISA bus..."); auto root_bus = kapi::devices::get_root_bus(); auto isa_bus = kstd::make_shared<arch::bus::isa>(); diff --git a/arch/x86_64/arch/drivers/cpu/lapic.cpp b/arch/x86_64/arch/drivers/cpu/lapic.cpp index f8aa8e90..c02c3df6 100644 --- a/arch/x86_64/arch/drivers/cpu/lapic.cpp +++ b/arch/x86_64/arch/drivers/cpu/lapic.cpp @@ -126,7 +126,7 @@ namespace arch::drivers::cpu if (!kapi::memory::map_mmio_region(m_mapped_region, kapi::memory::physical_address{mmio->start}, kapi::memory::page_mapper::flags::writable)) { - kstd::println(kstd::print_sink::stderr, "[x86_64:DRV] LAPIC {} MMIO mapping failed!", signature->hardware_id()); + kstd::println(kstd::print_sink::stderr, "[ARCH:DRV] LAPIC {} MMIO mapping failed!", signature->hardware_id()); return kstd::failure(make_error_code(kstd::errc::io_error)); } @@ -142,12 +142,12 @@ namespace arch::drivers::cpu write_register(registers::spurious_interrupt_vector, lapic_enable_bit | spurious_interrupt_vector); - kstd::println("[x86_64:DRV] LAPIC initialized. version: {#x} | max_lvt_entry: {} | eoi_suppression: {:s}", + kstd::println("[ARCH:DRV] LAPIC initialized. version: {#x} | max_lvt_entry: {} | eoi_suppression: {:s}", version, highest_lvt_entry_index, supports_eoi_broadcast_suppression); } else { - kstd::println("[x86_64:DRV] LAPIC {} is not on the BSP, deferring initialization.", signature->hardware_id()); + kstd::println("[ARCH:DRV] LAPIC {} is not on the BSP, deferring initialization.", signature->hardware_id()); } return kstd::success(); diff --git a/arch/x86_64/arch/memory/higher_half_mapper.cpp b/arch/x86_64/arch/memory/higher_half_mapper.cpp index 75adb3c5..974b00a0 100644 --- a/arch/x86_64/arch/memory/higher_half_mapper.cpp +++ b/arch/x86_64/arch/memory/higher_half_mapper.cpp @@ -33,7 +33,7 @@ namespace arch::memory if (entry.present()) { - kapi::system::panic("[x86_64:MEM] Tried to map a page that is already mapped!"); + kapi::system::panic("[ARCH:MEM] Tried to map a page that is already mapped!"); } entry.frame(frame, to_table_flags(flags) | page_table::entry::flags::present); @@ -45,7 +45,7 @@ namespace arch::memory { if (!try_unmap(page)) { - kapi::system::panic("[x86_64:MEM] Tried to unmap a page that is not mapped!"); + kapi::system::panic("[ARCH:MEM] Tried to unmap a page that is not mapped!"); } } diff --git a/arch/x86_64/arch/memory/kernel_mapper.cpp b/arch/x86_64/arch/memory/kernel_mapper.cpp index a15a1d9e..070a7866 100644 --- a/arch/x86_64/arch/memory/kernel_mapper.cpp +++ b/arch/x86_64/arch/memory/kernel_mapper.cpp @@ -50,7 +50,7 @@ namespace arch::memory auto elf_information = m_mbi->maybe_elf_symbols<elf::format::elf64>(); if (!elf_information) { - kapi::system::panic("[x86_64:MEM] ELF section information is not available."); + kapi::system::panic("[ARCH:MEM] ELF section information is not available."); } auto sections = *elf_information; @@ -64,7 +64,7 @@ namespace arch::memory if (allocated_sections.empty()) { - kapi::system::panic("[x86_64:MEM] No allocated ELF sections were found."); + kapi::system::panic("[ARCH:MEM] No allocated ELF sections were found."); } std::ranges::for_each(allocated_sections, @@ -78,7 +78,7 @@ namespace arch::memory auto linear_start_address = kapi::memory::linear_address{section.virtual_load_address}; auto physical_start_address = kapi::memory::physical_address{section.virtual_load_address & ~m_kernel_load_base}; - kstd::println("[x86_64:MEM] mapping {}" + kstd::println("[ARCH:MEM] mapping {}" "\n {} bytes -> page count: {}" "\n {} @ {}", name, section.size, number_of_pages, linear_start_address, physical_start_address); 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(); } |
