Ring 3 ready

- Fixed issue with setting up the Task Segment Register
This commit is contained in:
2023-02-13 22:44:47 +01:00
parent 1f90a5d862
commit c9a036bfbb
5 changed files with 38 additions and 31 deletions

View File

@ -5,6 +5,7 @@
.section .bootstrap_stack, "aw", @nobits
stack_bottom:
.skip 16384 # 16 KiB
.globl stack_top
stack_top:
/*
@ -75,16 +76,7 @@ _start:
4:
# At this point, paging is fully set up and enabled
isPaging:
/* push the pointer to the Multiboot information structure*/
pushl %ebx
/* push the magic value */
pushl %eax
call prekernelSetup
# Unmap the identity mapping as it is now unnecessary
# movl $0, boot_page_directory + 0
# Reload cr3 to force tlb flush
movl %cr3, %ecx
movl %ecx, %cr3
@ -97,6 +89,19 @@ isPaging:
pushl $0
popf
/* push the pointer to the Multiboot information structure*/
pushl %ebx
/* push the magic value */
pushl %eax
call prekernelSetup
# Unmap the identity mapping as it is now unnecessary
# movl $0, boot_page_directory + 0
call early_main