forked from xamidev/pepperOS
Flanterm can write to fb but page fault before process creation. (BEFORE KHEAP UPDATE)
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user