summaryrefslogtreecommitdiff
path: root/src/gdt.c
diff options
context:
space:
mode:
authorSimponic <loganthebean222@gmail.com>2021-03-08 23:28:16 -0700
committerSimponic <loganthebean222@gmail.com>2021-03-08 23:28:16 -0700
commitdede7fa93eb4d19c6290355af0c5cb342e47e2f6 (patch)
treebb2b1333d03a135d8998ab834546782fcdd3c680 /src/gdt.c
parentf42700b6c6329be0813b523bcde6bcf1ee13678a (diff)
downloadsimponicOS-dede7fa93eb4d19c6290355af0c5cb342e47e2f6.tar.gz
simponicOS-dede7fa93eb4d19c6290355af0c5cb342e47e2f6.zip
No progress on interrupts :(
Diffstat (limited to 'src/gdt.c')
-rw-r--r--src/gdt.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/gdt.c b/src/gdt.c
index fa52f38..5f597fd 100644
--- a/src/gdt.c
+++ b/src/gdt.c
@@ -1,4 +1,5 @@
#include "gdt.h"
+#include "print.h"
extern void reloadSegments();
@@ -11,6 +12,10 @@ void encodeGDT(uint8_t* gdtEntry, struct GDT source) {
// Size: 1 (32 bit protected mode)
gdtEntry[6] = 0xC0;
}
+ else if (source.limit == 0) {
+ // Don't set any granularity for null entry
+ gdtEntry[6] = 0;
+ }
else {
// Granularity: 0 (1 byte segments)
// Size: 1