From e6a67c80a6de0d72ebae860b6ca0fc5ed1cdec4b Mon Sep 17 00:00:00 2001 From: mintsuki Date: Fri, 8 Sep 2023 12:35:32 -0500 Subject: [PATCH] x86/gdt: Mark accessed flag in descriptors --- common/protos/linux_32.asm_x86 | 4 ++-- common/sys/gdt.s2.c | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/common/protos/linux_32.asm_x86 b/common/protos/linux_32.asm_x86 index a575f6bd..7bd20471 100644 --- a/common/protos/linux_32.asm_x86 +++ b/common/protos/linux_32.asm_x86 @@ -9,14 +9,14 @@ linux_gdt: dw 0xffff dw 0x0000 db 0x00 - db 10011010b + db 10011011b db 11001111b db 0x00 dw 0xffff dw 0x0000 db 0x00 - db 10010010b + db 10010011b db 11001111b db 0x00 diff --git a/common/sys/gdt.s2.c b/common/sys/gdt.s2.c index b807c840..2f413116 100644 --- a/common/sys/gdt.s2.c +++ b/common/sys/gdt.s2.c @@ -12,7 +12,7 @@ static struct gdt_desc gdt_descs[] = { .limit = 0xffff, .base_low = 0x0000, .base_mid = 0x00, - .access = 0b10011010, + .access = 0b10011011, .granularity = 0b00000000, .base_hi = 0x00 }, @@ -21,7 +21,7 @@ static struct gdt_desc gdt_descs[] = { .limit = 0xffff, .base_low = 0x0000, .base_mid = 0x00, - .access = 0b10010010, + .access = 0b10010011, .granularity = 0b00000000, .base_hi = 0x00 }, @@ -30,7 +30,7 @@ static struct gdt_desc gdt_descs[] = { .limit = 0xffff, .base_low = 0x0000, .base_mid = 0x00, - .access = 0b10011010, + .access = 0b10011011, .granularity = 0b11001111, .base_hi = 0x00 }, @@ -39,7 +39,7 @@ static struct gdt_desc gdt_descs[] = { .limit = 0xffff, .base_low = 0x0000, .base_mid = 0x00, - .access = 0b10010010, + .access = 0b10010011, .granularity = 0b11001111, .base_hi = 0x00 }, @@ -48,7 +48,7 @@ static struct gdt_desc gdt_descs[] = { .limit = 0x0000, .base_low = 0x0000, .base_mid = 0x00, - .access = 0b10011010, + .access = 0b10011011, .granularity = 0b00100000, .base_hi = 0x00 }, @@ -57,7 +57,7 @@ static struct gdt_desc gdt_descs[] = { .limit = 0x0000, .base_low = 0x0000, .base_mid = 0x00, - .access = 0b10010010, + .access = 0b10010011, .granularity = 0b00000000, .base_hi = 0x00 }