aboutsummaryrefslogtreecommitdiff
path: root/src/core/gdt.S
diff options
context:
space:
mode:
authorLoic Guegan <manzerbredes@mailbox.org>2021-05-02 14:46:18 +0200
committerLoic Guegan <manzerbredes@mailbox.org>2021-05-02 14:46:18 +0200
commite59104ffb55abe522c82d658f1f285149cca2cb1 (patch)
treeeb3cc1e46d0dd5b684864903b95ae32e245010da /src/core/gdt.S
parent4f08ba2b1d0ad7ea90d4d97a483b56b891b9c902 (diff)
Debug GDT enable multitasking
Diffstat (limited to 'src/core/gdt.S')
-rw-r--r--src/core/gdt.S22
1 files changed, 13 insertions, 9 deletions
diff --git a/src/core/gdt.S b/src/core/gdt.S
index c32db59..d99145e 100644
--- a/src/core/gdt.S
+++ b/src/core/gdt.S
@@ -3,31 +3,35 @@
gdt64:
gdt64_null:
- .long 0
- .long 0
+ .word 0xFFF
+ .word 0x0
+ .byte 0
+ .byte 0
+ .byte 1
+ .byte 0
gdt64_cs:
.long 0
.byte 0
- .byte 0b10011100
- .byte 0b00100000
+ .byte 0b10011010 # Present and non-conforming Readable
+ .byte 0b00100000 # Long mode
.byte 0
gdt64_ds:
.long 0
.byte 0
- .byte 0b10010010
+ .byte 0b10010010 # Present, writable
.word 0
gdt64_cs_user:
.long 0
.byte 0
- .byte 0b11111100
- .byte 0b00100000
+ .byte 0b11111010 # Present, Privilege 3 and non-conforming Readable
+ .byte 0b00100000 # Long mode
.byte 0
gdt64_ds_user:
.long 0
.byte 0
- .byte 0b11110010
+ .byte 0b11110010 # Present, Privilege 3 and writable
.word 0
- gdt64_tss:
+ gdt64_tss: # Will be setup in the boucane() function
.long 0
.long 0
.long 0