summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDanny Holman <dholman@gymli.xyz>2021-09-28 09:05:17 -0500
committerDanny Holman <dholman@gymli.xyz>2021-09-28 09:05:17 -0500
commit0ec9e9824e32d3d54d2ad43c3f2743d52127aa92 (patch)
treefa2b3c0a19bce487fc658f6db6354007e9eddeca
parent0ad50c878838640ce53c202ab028d7b2c5810fe6 (diff)
arch: i386: fix GDT segment mismatch
Fix a bug in which the size of the main GDT array and the actual number of descriptors are different values. Signed-off-by: Danny Holman <dholman@gymli.xyz>
-rw-r--r--arch/i386/boot/gdt.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/i386/boot/gdt.c b/arch/i386/boot/gdt.c
index 8be5563..d7873cc 100644
--- a/arch/i386/boot/gdt.c
+++ b/arch/i386/boot/gdt.c
@@ -68,7 +68,7 @@ uint64_t create_gdt_entry(uint32_t base, uint32_t limit, uint16_t flag) {
}
void gdt_install(void) {
- gp.limit = 64 * 3 - 1;
+ gp.limit = 64 * 5 - 1;
gp.base = (uint32_t)&desc;
desc[0] = create_gdt_entry(0, 0, 0);