Go to the source code of this file.
Macro Definition Documentation
      
        
          | #define GDT_BUILD_SELECTOR | 
          ( | 
            | 
          seg,  | 
        
        
           | 
           | 
            | 
          local,  | 
        
        
           | 
           | 
            | 
          rpl  | 
        
        
           | 
          ) | 
           |    ((seg << 3) | ((local & 0x1) << 2) | (rpl & 0x3)) | 
        
      
 
Definition at line 52 of file gdt.h.
 
 
      
        
          | #define GDT_CORE_CODE_SEGMENT   1 | 
        
      
 
Definition at line 45 of file gdt.h.
 
 
      
        
          | #define GDT_CORE_DATA_SEGMENT   2 | 
        
      
 
Definition at line 46 of file gdt.h.
 
 
      
        
          | #define GDT_PARTITION_CODE_SEGMENT | 
          ( | 
            | 
          partition_id | ) | 
             (4 + 2 * partition_id) | 
        
      
 
Definition at line 49 of file gdt.h.
 
 
      
        
          | #define GDT_PARTITION_DATA_SEGMENT | 
          ( | 
            | 
          partition_id | ) | 
             (4 + 2 * partition_id + 1) | 
        
      
 
Definition at line 50 of file gdt.h.
 
 
      
        
          | #define GDT_TSS_SEGMENT   3 | 
        
      
 
Definition at line 47 of file gdt.h.
 
 
Typedef Documentation
Enumeration Type Documentation
- Enumerator: 
 
| GDTE_CODE  | 
 | 
| GDTE_DATA  | 
 | 
| GDTE_TSS  | 
 | 
 
Definition at line 23 of file gdt.h.
 
 
Function Documentation
Definition at line 99 of file gdt.c.
{
   if (limit > (1 << 20)) 
   {
      pok_gdt[index].limit_low = (limit >> 12) & 0xFFFF;
 
      pok_gdt[index].limit_high = (limit >> 28) & 0xF;
 
   }
   else 
   {
      pok_gdt[index].limit_low = limit & 0xFFFF;
 
      pok_gdt[index].limit_high = (limit >> 16) & 0xFF;
 
   }
   pok_gdt[index].base_low = base_address & 0xFFFFFF;
 
   pok_gdt[index].base_high = (base_address >> 24) & 0xFF;
 
}
 
 
 
Definition at line 130 of file gdt.c.
{
   pok_gdt[index].limit_low = limit & 0xFFFF;
 
   pok_gdt[index].limit_high = (limit >> 16) & 0xFF;
 
   pok_gdt[index].base_low = base_address & 0xFFFFFF;
 
   pok_gdt[index].base_high = (base_address >> 24) & 0xFF;
 
}
 
 
 
Definition at line 41 of file gdt.c.
{
   sysdesc_t sysdesc;
   
   
   
   asm ("lgdt %0"
         :
         : "m" (sysdesc));
   
   asm ("ljmp %0, $1f   \n"
         "1:            \n"
         "mov %1, %%ax  \n"
         "mov %%ax, %%ds        \n"
         "mov %%ax, %%es        \n"
         "mov %%ax, %%fs        \n"
         "mov %%ax, %%gs        \n"
         "mov %%ax, %%ss        \n"
         :
         : "eax");
}
 
 
 
Definition at line 79 of file gdt.c.
{
   asm ("ltr %0" : :"m"(sel));
}
 
 
 
Definition at line 94 of file gdt.c.