From 90dc26ee11e8801dbc333d94aaf8b126bf25a6ee Mon Sep 17 00:00:00 2001 From: xamidev Date: Sun, 8 Mar 2026 09:14:21 +0100 Subject: [PATCH] Flanterm support OK from kmain. No kbd. Writing from process = PF --- .gitignore | 3 ++- Makefile | 2 +- src/io/term/term.c | 1 + src/kmain.c | 8 +++----- src/sched/process.c | 6 +++--- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.gitignore b/.gitignore index 54bb06f..8120a94 100644 --- a/.gitignore +++ b/.gitignore @@ -9,4 +9,5 @@ iso_root */*/*.gch .gdb_history symbols.map -symbols.S \ No newline at end of file +symbols.S +*.log \ No newline at end of file diff --git a/Makefile b/Makefile index c881590..e0bc1e9 100644 --- a/Makefile +++ b/Makefile @@ -35,7 +35,7 @@ build-iso: limine/limine build ./limine/limine bios-install pepper.iso debug: - /usr/bin/qemu-system-x86_64 -drive file=pepper.iso -s -S -d int -no-reboot -no-shutdown & + /usr/bin/qemu-system-x86_64 -drive file=pepper.iso -s -S -d int -D qemu.log -no-reboot -no-shutdown & gdb pepperk --command=debug.gdb debug2: diff --git a/src/io/term/term.c b/src/io/term/term.c index 56522b0..6d7b709 100644 --- a/src/io/term/term.c +++ b/src/io/term/term.c @@ -34,4 +34,5 @@ void kputs(const char* str) _putchar(str[i]); i++; } + _putchar('\r'); } \ No newline at end of file diff --git a/src/kmain.c b/src/kmain.c index 215893d..cb79c5e 100644 --- a/src/kmain.c +++ b/src/kmain.c @@ -75,6 +75,7 @@ extern uintptr_t kheap_start; // This is our entry point void kmain() { + CLEAR_INTERRUPTS; if (!LIMINE_BASE_REVISION_SUPPORTED) hcf(); serial_init(); @@ -92,6 +93,8 @@ void kmain() paging_init(boot_ctx.kaddr, boot_ctx.fb); kheap_init(); + keyboard_init(FR); + uint32_t bgColor = 0x252525; ft_ctx = flanterm_fb_init( kmalloc, @@ -110,7 +113,6 @@ void kmain() 0 ); - CLEAR_INTERRUPTS; gdt_init(); idt_init(); @@ -128,10 +130,6 @@ void kmain() current_process = idle_proc; current_process->status = RUNNING; - SET_INTERRUPTS; - - keyboard_init(FR); - kputs(PEPPEROS_SPLASH); idle(); } diff --git a/src/sched/process.c b/src/sched/process.c index 1c7c243..e0fc25b 100644 --- a/src/sched/process.c +++ b/src/sched/process.c @@ -45,7 +45,7 @@ void process_display_list(struct process_t* processes_list) struct process_t* process_create(char* name, void(*function)(void*), void* arg) { - CLEAR_INTERRUPTS; +/* CLEAR_INTERRUPTS; */ struct process_t* proc = (struct process_t*)kmalloc(sizeof(struct process_t)); struct cpu_status_t* ctx = (struct cpu_status_t*)kmalloc(sizeof(struct cpu_status_t)); @@ -79,7 +79,7 @@ struct process_t* process_create(char* name, void(*function)(void*), void* arg) process_add(&processes_list, proc); - SET_INTERRUPTS; +/* SET_INTERRUPTS; */ return proc; } @@ -154,7 +154,7 @@ void process_exit() } SET_INTERRUPTS; - outb(0x20, 0x20); + //outb(0x20, 0x20); for (;;) { asm("hlt");