Ring 3 ready

- Fixed issue with setting up the Task Segment Register
This commit is contained in:
2023-02-13 22:44:47 +01:00
parent 1f90a5d862
commit c9a036bfbb
5 changed files with 38 additions and 31 deletions

View File

@ -40,8 +40,7 @@ void initGDT(){
add_descriptor(USER_DATA_SEGMENT, 0, 0xFFFFFFFF, 0xF2, 0xCF);
// init Gdt Descriptor
gdtDescriptor.limit = ((sizeof(SegmentDescriptor ) * 5 ) - 1);
gdtDescriptor.limit = ((sizeof(SegmentDescriptor ) * 6 ) - 1);
gdtDescriptor.base = (unsigned int) (&GlobalDescriptorTable);
LoadGlobalDescriptorTable();
}

View File

@ -32,5 +32,4 @@ struct GlobalDescriptorTableDescriptor{
void add_descriptor(int which , unsigned long base, unsigned long limit, unsigned char access, unsigned char granularity );
extern "C" void LoadGlobalDescriptorTable();
void initGDT();