Clean up jump into RING 3

This commit is contained in:
2023-02-17 14:46:44 +01:00
parent 4ce7cc093b
commit ecab248cd6
5 changed files with 51 additions and 35 deletions

View File

@ -99,11 +99,9 @@ isPaging:
# Unmap the identity mapping as it is now unnecessary
# movl $0, boot_page_directory + 0
call early_main
call kernel
cli
1: hlt
@ -115,4 +113,18 @@ isPaging:
.include "./source/kernel/irq_table.s"
.include "./source/kernel/interrupts/idt.s"
.globl jump_usermode
jump_usermode:
mov $((4*8) | 3) , %ax
mov %ax, %ds
mov %ax, %es
mov %ax, %fs
mov %ax, %gs
mov %esp, %eax
push $( (3*8) | 3)
push %eax
pushf
push $( ( 3 * 8) | 3)
push startSuperVisorTerminal
iret