This commit is contained in:
2021-09-14 18:35:52 +03:00
parent f052f2294e
commit d605c6a016
84 changed files with 3647 additions and 1192 deletions

View File

@ -2,7 +2,7 @@
* gdt.c - GLOBAL DESCRIPTOR TABLE *
* Contains function prototypes for setting up the GDT *
******************************************************************/
#define MAX_DESCRIPTORS 3
#define MAX_DESCRIPTORS 5
#include "gdt.h"
/* Our GDT, with 3 entries, and finally our special GDT pointer */
@ -59,6 +59,12 @@ void i86_gdt_install()
* this entry's access byte says it's a Data Segment */
i86_gdt_set_gate(2, 0, 0xFFFFFFFF, 0x92, 0xCF);
/* User mode Code segment*/
i86_gdt_set_gate(3, 0, 0xFFFFFFFF, 0xFA, 0xCF);
/* User mode data segment*/
i86_gdt_set_gate(4, 0, 0xFFFFFFFF, 0xF2, 0xCF);
/* Flush out the old GDT and install the new changes! */
i86_gdt_flush();
}