From 0482f594ef91542736ead51a545d66aee0c7ab69 Mon Sep 17 00:00:00 2001 From: xamidev Date: Sun, 15 Mar 2026 21:11:47 +0100 Subject: [PATCH] Flanterm back to bump alloc (allows earlier use for real hw debugging) --- src/config.h | 2 +- src/io/serial/serial.c | 2 +- src/io/term/term.c | 4 ++-- src/kmain.c | 9 ++++----- 4 files changed, 8 insertions(+), 9 deletions(-) diff --git a/src/config.h b/src/config.h index 1c0bf25..8cab072 100644 --- a/src/config.h +++ b/src/config.h @@ -11,7 +11,7 @@ #define PEPPEROS_VERSION_MAJOR "0" #define PEPPEROS_VERSION_MINOR "0" #define PEPPEROS_VERSION_PATCH "58" -#define PEPPEROS_SPLASH "\x1b[38;5;196mPepperOS\x1b[0m version "PEPPEROS_VERSION_MAJOR"."PEPPEROS_VERSION_MINOR"."PEPPEROS_VERSION_PATCH"\n" +#define PEPPEROS_SPLASH "\x1b[38;5;196mPepperOS\x1b[0m version \x1b[38;5;220m"PEPPEROS_VERSION_MAJOR"."PEPPEROS_VERSION_MINOR"."PEPPEROS_VERSION_PATCH"\x1b[0m built on \x1b[38;5;40m"__DATE__" "__TIME__"\x1b[0m\n" /* process */ #define PROCESS_NAME_MAX 64 diff --git a/src/io/serial/serial.c b/src/io/serial/serial.c index 5b8e931..0b37f9c 100644 --- a/src/io/serial/serial.c +++ b/src/io/serial/serial.c @@ -61,8 +61,8 @@ int serial_init() // Set normal operation mode outb(PORT + 4, 0x0F); - DEBUG("*** Welcome to PepperOS! ***"); init.serial = true; + DEBUG("*** Welcome to PepperOS! (built @ %s %s) ***", __DATE__, __TIME__); return 0; } diff --git a/src/io/term/term.c b/src/io/term/term.c index 20aa132..8367a51 100644 --- a/src/io/term/term.c +++ b/src/io/term/term.c @@ -136,8 +136,8 @@ void term_init() { uint32_t bgColor = 0x252525; ft_ctx = flanterm_fb_init( - kmalloc, - flanterm_free_wrapper, + NULL, + NULL, boot_ctx.fb->address, boot_ctx.fb->width, boot_ctx.fb->height, boot_ctx.fb->pitch, boot_ctx.fb->red_mask_size, boot_ctx.fb->red_mask_shift, boot_ctx.fb->green_mask_size, boot_ctx.fb->green_mask_shift, diff --git a/src/kmain.c b/src/kmain.c index 07b0d17..d76801c 100644 --- a/src/kmain.c +++ b/src/kmain.c @@ -94,15 +94,16 @@ void kmain() CLEAR_INTERRUPTS; if (!LIMINE_BASE_REVISION_SUPPORTED) hcf(); - serial_init(); - timer_init(); - // Populate boot context boot_ctx.fb = framebuffer_request.response ? framebuffer_request.response->framebuffers[0] : NULL; boot_ctx.mmap = memmap_request.response ? memmap_request.response : NULL; boot_ctx.hhdm = hhdm_request.response ? hhdm_request.response : NULL; boot_ctx.kaddr = kerneladdr_request.response ? kerneladdr_request.response : NULL; + term_init(); + serial_init(); + timer_init(); + boot_mem_display(); pmm_init(boot_ctx); @@ -112,8 +113,6 @@ void kmain() keyboard_init(FR); - term_init(); - gdt_init(); idt_init();