Commit Graph

2 Commits

Author SHA1 Message Date
AI
993cf05712 feat: graphical framebuffer support for VGA driver
When GRUB is configured with multiboot2, it may provide a graphical
(RGB) framebuffer instead of legacy VGA text mode. This happens on
UTM/QEMU on macOS and other configurations where the bootloader
switches to a pixel-based display.

- Parse multiboot2 framebuffer tag in kernel_main to detect display mode
- Identity-map the framebuffer address (often at 0xFD000000+) after
  paging is enabled, with write-through caching
- Add framebuffer.h describing the boot-time display info
- Embed 8x16 VGA bitmap font (font8x16.h) for pixel-mode rendering
- Rewrite VGA driver to support both text mode and pixel mode:
  - Text mode: unchanged behavior writing to 0xB8000
  - Pixel mode: renders characters using the bitmap font to the
    GRUB-provided framebuffer, with proper VGA color palette mapping
  - Auto-detects mode from fb_info at init time
- Multiboot2 header now requests text mode via framebuffer tag, but
  gracefully falls back to pixel rendering if GRUB provides RGB
- Reverted grub.cfg gfxpayload=text (caused display issues on UTM)

Tested: boots in both text mode and graphical framebuffer mode.
2026-02-23 13:25:42 +00:00
AI
313aeb5872 Implement VGA text-mode driver with memory statistics display (AI)
- Created VGA driver that writes to the 0xB8000 text-mode framebuffer.
  Supports 80x25 display with 16 foreground/background colors, scrolling,
  hardware cursor updates, and special characters (\n, \r, \t, \b).
- Provides vga_puts, vga_putchar, vga_put_hex, vga_put_dec, vga_set_color.
- Displays boot banner ("ClaudeOS v0.1 booting...") on screen clear.
- vga_show_mem_stats() prints total RAM, kernel start/end addresses, and
  kernel size on the VGA display during boot.
- Registered as the first driver using REGISTER_DRIVER, proving the
  driver framework works end-to-end (probe -> init lifecycle).

Tested: driver loads successfully, debug port confirms vga probe/init.
2026-02-23 11:10:48 +00:00