diff options
author | Simponic <loganthebean222@gmail.com> | 2021-03-08 23:31:08 -0700 |
---|---|---|
committer | Simponic <loganthebean222@gmail.com> | 2021-03-08 23:31:08 -0700 |
commit | fe3d7ad8322df67abd4255b9d377d8bab0007c04 (patch) | |
tree | 01f5b3eb9c6512d5fa88d0a739627ef9810f677a /src/gdt.c | |
parent | c1beac8b2174e0bdc333b69deb92bce5a2c33fd9 (diff) | |
parent | dede7fa93eb4d19c6290355af0c5cb342e47e2f6 (diff) | |
download | simponicOS-fe3d7ad8322df67abd4255b9d377d8bab0007c04.tar.gz simponicOS-fe3d7ad8322df67abd4255b9d377d8bab0007c04.zip |
Diffstat (limited to 'src/gdt.c')
-rw-r--r-- | src/gdt.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -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 |