made the jump to ring 3

This commit is contained in:
2026-06-16 21:53:38 -04:00
parent 171cbd21bc
commit 0cb7311911
4 changed files with 35 additions and 278 deletions

View File

@@ -86,6 +86,11 @@ void load_origin_program(multiboot_info* mbi) {
map_page(0xBFFFF000, stack_paddr, PAGE_PRESENT | PAGE_WRITABLE | PAGE_USER);
kprintf("program loaded into memory @ [virt] 0x%x\n", elf->e_entry);
extern void liftoff(uint32_t entry, uint32_t stack_top);
kprintf("launching origin process");
uint32_t stack_top = 0xBFFFF000 + 4095;
liftoff(elf->e_entry, stack_top);
}
void kmain(uint32_t magic, multiboot_info* mbi) {