#include <libc.h>
#include <types.h>
#include <errno.h>
#include "gdt.h"
#include "sysdesc.h"
#include "tss.h"
Go to the source code of this file.
Macro Definition Documentation
Definition at line 35 of file gdt.c.
#define POK_CONFIG_NB_PARTITIONS 0 |
Definition at line 32 of file gdt.c.
#define POK_CONFIG_NB_THREADS 0 |
Definition at line 28 of file gdt.c.
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.
Variable Documentation
Definition at line 37 of file gdt.c.
Definition at line 39 of file gdt.c.