From 458978e7b8a6d50566fc8b68558f76f6b0465c52 Mon Sep 17 00:00:00 2001 From: dzwdz Date: Fri, 15 Sep 2023 00:29:11 +0200 Subject: kern: fix GDT order for 64bit sysret --- src/kernel/arch/amd64/boot.h | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'src/kernel/arch/amd64/boot.h') diff --git a/src/kernel/arch/amd64/boot.h b/src/kernel/arch/amd64/boot.h index 7c36cd3..fac4ab6 100644 --- a/src/kernel/arch/amd64/boot.h +++ b/src/kernel/arch/amd64/boot.h @@ -3,12 +3,13 @@ enum gdt_segs { SEG_null, /* order dictated by SYSENTER */ - SEG_r0code, - SEG_r0data, - SEG_r3code, - SEG_r3data, - SEG_TSS, - SEG_TSS2, + SEG_r0code = 1, + SEG_r0data = 2, + SEG_r3code32 = 3, + SEG_r3data = 4, + SEG_r3code = 5, + SEG_TSS = 6, + SEG_TSS2 = 7, SEG_end }; -- cgit v1.2.3