Ring 3 ready
- Fixed issue with setting up the Task Segment Register
This commit is contained in:
		@ -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();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@ -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();
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user