starkernel: item 4.4c/4.4d -- wire console_fb_init into boot, route emit_prefix to framebuffer

console_fb_init() (which calls vt100_init()) was never called anywhere in the
boot sequence -- only raw fb_init() ran, so vt100_putc() no-op'd on every
call and no console output (REPL, POST, boot logs) ever reached the
framebuffer, only the corner orientation-test blocks. Replace the raw
fb_init() call in kernel_main_deep() with console_fb_init() so the
framebuffer console actually comes up (4.4c).

emit_prefix() also wrote the "[VMName] " bracket text via raw_putc() only
(serial), never vt100_putc(), so the bracketed VM name never reached the
screen even once the framebuffer console was live. Mirror console_putc()'s
existing serial/framebuffer split there too (4.4d).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
Robert Allan James
2026-08-11 08:13:10 -04:00
co-authored by Claude Sonnet 5
parent bf89b8239f
commit becaea7def
2 changed files with 22 additions and 8 deletions
+12 -2
View File
@@ -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(' ');
}
/**