diff options
| author | Ian Moffett <ian@osmora.org> | 2025-11-15 14:47:14 -0500 |
|---|---|---|
| committer | Ian Moffett <ian@osmora.org> | 2025-11-15 14:47:14 -0500 |
| commit | 048985aad37278633145add81553e76581944dba (patch) | |
| tree | 1787d98c7de9cc315e1fd5c655d6fae07b349078 /sys/arch/amd64/cpu/boot.S | |
| parent | 379917055cf85332c44256c3129ed9abe0fe5c09 (diff) | |
kern/amd64: cpu: Load new flat GDT on boot
Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'sys/arch/amd64/cpu/boot.S')
| -rw-r--r-- | sys/arch/amd64/cpu/boot.S | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/sys/arch/amd64/cpu/boot.S b/sys/arch/amd64/cpu/boot.S index 9fb8b60..3ce82e6 100644 --- a/sys/arch/amd64/cpu/boot.S +++ b/sys/arch/amd64/cpu/boot.S @@ -29,12 +29,17 @@ .globl _start .extern uart_init + .extern gdt_load + .extern GDTR _start: cli cld - xor %rbp, %rbp - call uart_init + xor %rbp, %rbp /* Terminate callstack */ + call uart_init /* Initialize platform UART */ + + lea GDTR(%rip), %rdi /* Our GDTR */ + call gdt_load /* Load our GDT */ 1: cli hlt |
