Flanterm can write to fb but page fault before process creation. (BEFORE KHEAP UPDATE)

This commit is contained in:
2026-03-04 12:21:20 +01:00
parent 9df33b49d8
commit a7d9e70a61
10 changed files with 33 additions and 49 deletions

View File

@@ -13,6 +13,9 @@
#include "config.h"
#include "io/serial/serial.h"
#include "io/term/flanterm.h"
extern struct flanterm_context* ft_ctx;
struct process_t* processes_list;
struct process_t* current_process;
@@ -139,23 +142,6 @@ struct process_t* process_get_next(struct process_t* process)
return process->next;
}
// (from gdt) This will switch tasks ONLY in ring 0
// KERNEL CS = 0x08
// KERNEL SS = 0x10
__attribute__((naked, noreturn))
void process_switch(uint64_t stack_addr, uint64_t code_addr)
{
asm volatile(" \
push $0x10 \n\
push %0 \n\
push $0x202 \n\
push $0x08 \n\
push %1 \n\
iretq \n\
" :: "r"(stack_addr), "r"(code_addr));
}
// Will be used to clean up resources (if any, when we implement it)
// Just mark as DEAD then idle. Scheduler will delete process at next timer interrupt % quantum.
void process_exit()