From d71a5f25d36f36594da64ae2d8c2e4b0ba9a89db Mon Sep 17 00:00:00 2001 From: Daniel Samson <12231216+daniel-samson@users.noreply.github.com> Date: Mon, 13 Jul 2026 05:37:35 +0100 Subject: [PATCH] fix kernel: debug --- system/kernel/kernel.zig | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/system/kernel/kernel.zig b/system/kernel/kernel.zig index 297780a..00e4b8b 100644 --- a/system/kernel/kernel.zig +++ b/system/kernel/kernel.zig @@ -285,7 +285,7 @@ fn kmain(boot_information: *const BootInformation) noreturn { status("/system/kernel: starting /system/services/init...\n"); const image = @as([*]const u8, @ptrFromInt(boot_handoff.physicalToVirtual(boot_information.init_base)))[0..boot_information.init_len]; process.spawnProcess(image, 4, &.{"/system/services/init"}) catch |err| { - statusPrint("/system/services/init failed to load: {s}\n", .{@errorName(err)}); + statusPrint("/system/kernel: /system/services/init failed to load: {s}\n", .{@errorName(err)}); }; } else { status("no /system/services/init on the boot volume.\n"); @@ -294,7 +294,7 @@ fn kmain(boot_information: *const BootInformation) noreturn { // Become the idle task: drop below every real task and halt until an // interrupt. The timer keeps preempting into init and any other work. scheduler.setPriority(0); - status("\nkernel idle; user space is running.\n"); + status("\n/system/kernel: kernel idle; user space is running.\n"); architecture.halt(); } @@ -344,7 +344,7 @@ fn bringUpSecondaries() void { // This core's dedicated fault stack — allocated only now that the core is // real, rather than reserved statically for every possible core. const fault_stack = heap.allocator().alloc(u8, architecture.fault_stack_size) catch { - log.print(" cpu apic_id {d}: no fault stack; skipped\n", .{core.apic_id}); + log.print("/system/kernel: cpu apic_id {d}: no fault stack; skipped\n", .{core.apic_id}); continue; }; architecture.setFaultStack(index, (@intFromPtr(fault_stack.ptr) + fault_stack.len) & ~@as(usize, 15)); @@ -353,11 +353,11 @@ fn bringUpSecondaries() void { while (attempt <= maximum_wake_attempts) : (attempt += 1) { if (architecture.startSecondary(core.apic_id, stack_top, @intFromPtr(pc), index)) { pc.online = true; - log.print(" cpu apic_id {d}: online (attempt {d})\n", .{ core.apic_id, attempt }); + log.print("/system/kernel: cpu apic_id {d}: online (attempt {d})\n", .{ core.apic_id, attempt }); break; } if (attempt == maximum_wake_attempts) - log.print(" cpu apic_id {d}: no response after {d} attempts (parked)\n", .{ core.apic_id, maximum_wake_attempts }); + log.print("/system/kernel: cpu apic_id {d}: no response after {d} attempts (parked)\n", .{ core.apic_id, maximum_wake_attempts }); } } log.print("/system/kernel: {d}/{d} cores online\n", .{ scheduler.onlineCount(), cores.len });