From 4d9223c8ccaf53c93393aad1e17d2c2ab4a90cf0 Mon Sep 17 00:00:00 2001 From: subhobhai943 Date: Tue, 25 Aug 2026 02:08:37 +0530 Subject: [PATCH] feat(video): Move the console to the framebuffer once the adapter is graphical bochs_vbe_init switches the adapter into graphics mode at boot step [5/14], and from that point the VGA text buffer is no longer scanned out. This kernel boots to a TTY, so every message after that -- and the whole shell session -- was invisible in the emulator window and reached only the serial line. The console now moves to the framebuffer at that transition, which also makes the nano editor render correctly: it positions with tty_set_cursor() rather than escape sequences, and the TTY driver dispatches that to fbcon. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01L5yKJT4Wo2cV3rfPrwY5MP --- README.md | 4 ++++ kernel/main.c | 7 +++++++ 2 files changed, 11 insertions(+) diff --git a/README.md b/README.md index 8d0577d..a0156ac 100644 --- a/README.md +++ b/README.md @@ -33,6 +33,10 @@ - **4-bit palette-indexed asset**: 160x160 pixels in 12.5 KB rather than 100 KB, with a transparency mask so the mark composites onto the background instead of a flat rectangle. - **Regenerable**: `python3 scripts/mklogo.py path/to/logo.png` rewrites `init/logo_data.c` from source artwork. - ๐Ÿ”ค **Shared 8x8 Console Font (`lib/font8x8.c`)**: one glyph table behind the framebuffer console and the 2D canvas rasterizer, replacing divergent private copies. +- ๐Ÿ–ต **Framebuffer Console (`drivers/video/fbcon.c`)**: + - Once the VBE adapter is in graphics mode the VGA text buffer stops being scanned out, so the console would be invisible on the display even though it still reaches serial. fbcon renders the console into the framebuffer instead, the way Linux fbcon does. + - **VT100 subset**: SGR colours, cursor addressing, relative moves, erase-display and erase-line, save/restore โ€” enough for full-screen curses-style programs such as the **nano** editor to render correctly. + - Presents a fixed **80x25** grid (matching `TTY_WIDTH`/`TTY_HEIGHT`, which the userland assumes) with the glyph cell scaled to fill whatever resolution is active. `video=WIDTHxHEIGHT` on the kernel command line selects the mode, defaulting to `1280x720`. - ๐Ÿงต **Kernel Concurrency Core (`kernel/wait.c`, `kernel/futex.c`, `kernel/rcu.c`)**: - **Wait Queues & Completions**: Sleeper parking with timed waits, one-shot completion barriers, and a static entry pool so a blocking path never re-enters the allocator (`waitinfo`). - **Futex Hash Table**: 32 buckets with value re-check on the slow path, requeue support, and an `fmutex_t` sleeping mutex built on the uncontended-fastpath protocol (`futexinfo`). diff --git a/kernel/main.c b/kernel/main.c index 8b2558f..a9cd8ec 100644 --- a/kernel/main.c +++ b/kernel/main.c @@ -88,6 +88,7 @@ #include #include #include +#include #include #include #include @@ -135,6 +136,11 @@ static void subos_modular_core_boot(void) { // The ASCII logo printed at the top of boot covers the default case. if (init_has_param("splash") && !init_has_param("nosplash")) { boot_logo_splash_begin(); + } else { + // The adapter is in graphics mode from here on, so the VGA text buffer + // is no longer scanned out. Move the console to the framebuffer or the + // rest of the boot log is visible only on the serial line. + fbcon_enable(true); } // Network Subsystem, NetFilter, HTTPD & SSH Server @@ -248,6 +254,7 @@ static void subos_modular_core_boot(void) { // Return the screen to the console before handing over to the shell. boot_logo_splash_end(); + fbcon_enable(true); // Launch Shell shell_run();