diff options
author | dzwdz | 2023-09-15 00:29:11 +0200 |
---|---|---|
committer | dzwdz | 2023-09-15 00:29:11 +0200 |
commit | 458978e7b8a6d50566fc8b68558f76f6b0465c52 (patch) | |
tree | 0b2decb03e5f07fa790d7add0fc16679472012de /src/kernel/arch/amd64/32/gdt.c | |
parent | 8757321821d05d2958160e1428250daf19c119e9 (diff) |
kern: fix GDT order for 64bit sysret
Diffstat (limited to 'src/kernel/arch/amd64/32/gdt.c')
-rw-r--r-- | src/kernel/arch/amd64/32/gdt.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/kernel/arch/amd64/32/gdt.c b/src/kernel/arch/amd64/32/gdt.c index bd5fa48..e643f27 100644 --- a/src/kernel/arch/amd64/32/gdt.c +++ b/src/kernel/arch/amd64/32/gdt.c @@ -75,8 +75,9 @@ void gdt_init(void) { gdt_fillout(&GDT[SEG_r0code], 0, true); gdt_fillout(&GDT[SEG_r0data], 0, false); - gdt_fillout(&GDT[SEG_r3code], 3, true); + gdt_fillout(&GDT[SEG_r3code32], 3, true); gdt_fillout(&GDT[SEG_r3data], 3, false); + gdt_fillout(&GDT[SEG_r3code], 3, true); lgdt_arg.limit = sizeof(GDT) - 1; lgdt_arg.base = (uint64_t)&GDT; |