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.
This commit is contained in:
@@ -9,6 +9,7 @@
|
||||
#include "paging.h"
|
||||
#include "kmalloc.h"
|
||||
#include "driver.h"
|
||||
#include "vga.h"
|
||||
|
||||
void offset_print(const char *str)
|
||||
{
|
||||
@@ -71,6 +72,10 @@ void kernel_main(uint32_t magic, uint32_t addr) {
|
||||
init_drivers();
|
||||
offset_print("Drivers initialized\n");
|
||||
|
||||
/* Show memory statistics and boot progress on VGA */
|
||||
vga_show_mem_stats();
|
||||
vga_puts("Boot complete.\n\n");
|
||||
|
||||
/* Test kmalloc/kfree */
|
||||
uint32_t *test_alloc = (uint32_t *)kmalloc(64);
|
||||
if (test_alloc) {
|
||||
|
||||
Reference in New Issue
Block a user