diff --git a/src/starkernel/hal/console.c b/src/starkernel/hal/console.c index 47b7b87..3083c7e 100644 --- a/src/starkernel/hal/console.c +++ b/src/starkernel/hal/console.c @@ -192,13 +192,23 @@ static void raw_putc(char c) { #endif } -/* Emit "[VMName] " directly via raw_putc — no recursion into console_putc */ +/* Emit "[VMName] " to both serial (raw_putc) and, when available, the + * framebuffer (vt100_putc) -- mirrors console_putc()'s own serial/framebuffer + * split so the prefix reaches both outputs, not serial only. No recursion + * into console_putc itself (would re-trigger the line-start prefix check). */ static void emit_prefix(void) { const char *p; + int fb = fb_is_available(); raw_putc('['); - for (p = g_active_vm_name; *p; p++) raw_putc(*p); + if (fb) vt100_putc('['); + for (p = g_active_vm_name; *p; p++) { + raw_putc(*p); + if (fb) vt100_putc(*p); + } raw_putc(']'); + if (fb) vt100_putc(']'); raw_putc(' '); + if (fb) vt100_putc(' '); } /** diff --git a/src/starkernel/kernel_main.c b/src/starkernel/kernel_main.c index 36c6d65..7180d93 100644 --- a/src/starkernel/kernel_main.c +++ b/src/starkernel/kernel_main.c @@ -827,11 +827,15 @@ static void kernel_main_deep(BootInfo *boot_info) { #endif /* - * FABRIC.md item 4.3.1 -- raw framebuffer boot diagnostic. - * console.c / vt100.c are superseded by the Console drawing-fabric - * redesign (FABRIC.md §27) and are deliberately not invoked here. - * fb_init() wires the raw GOP framebuffer directly; the orientation - * test pattern is drawn on a blank framebuffer, nothing else touches it. + * FABRIC.md item 4.3.1 -- raw framebuffer boot diagnostic, plus 4.4c + * (2026-08-11): console_fb_init() wires the framebuffer AND turns on + * vt100_init(), so serial and framebuffer consoles carry identical + * output from here on -- Captain Bob's stated end goal. Previously only + * raw fb_init() ran and console.c/vt100.c's framebuffer path was + * deliberately skipped ("superseded by the Console drawing-fabric + * redesign"); that left vt100_putc() permanently uninitialized and no + * console output ever reached the screen. console_fb_init() calls + * fb_init() internally, so this replaces the old call, not adds to it. */ if (boot_info->framebuffer.base != NULL && boot_info->framebuffer.size > 0) { FbPixelFormat fb_fmt; @@ -840,7 +844,7 @@ static void kernel_main_deep(BootInfo *boot_info) { case (UINT32)PixelBlueGreenRedReserved8BitPerColor: fb_fmt = FB_PIXEL_BGRX32; break; default: fb_fmt = FB_PIXEL_BGRX32; break; } - fb_init(&boot_info->framebuffer, fb_fmt); + console_fb_init(&boot_info->framebuffer, fb_fmt); fb_draw_orientation_test(); }