27 #ifndef POK_NEEDS_THREADS
28 #define POK_CONFIG_NB_THREADS 0
31 #ifndef POK_NEEDS_PARTITIONS
32 #define POK_CONFIG_NB_PARTITIONS 0
53 sysdesc.limit =
sizeof (
pok_gdt);
61 asm (
"ljmp %0, $1f \n"
90 asm (
"ltr %0" : :
"m"(sel));
105 if (limit > (1 << 20))
107 pok_gdt[index].limit_low = (limit >> 12) & 0xFFFF;
108 pok_gdt[index].limit_high = (limit >> 28) & 0xF;
109 pok_gdt[index].granularity = 1;
113 pok_gdt[index].limit_low = limit & 0xFFFF;
114 pok_gdt[index].limit_high = (limit >> 16) & 0xFF;
115 pok_gdt[index].granularity = 0;
118 pok_gdt[index].base_low = base_address & 0xFFFFFF;
119 pok_gdt[index].base_high = (base_address >> 24) & 0xFF;
122 pok_gdt[index].dpl = dpl & 0x3;
136 pok_gdt[index].limit_low = limit & 0xFFFF;
137 pok_gdt[index].limit_high = (limit >> 16) & 0xFF;
138 pok_gdt[index].base_low = base_address & 0xFFFFFF;
139 pok_gdt[index].base_high = (base_address >> 24) & 0xFF;
142 pok_gdt[index].dpl = dpl & 0x3;