UnnamedOS
gdt.c File Reference
#include <common.h>
#include <mem/gdt.h>
#include <tasks/tss.h>
+ Include dependency graph for gdt.c:

Go to the source code of this file.

Data Structures

struct  gdtr_t
 the GDTR register pointing to the GDT More...
 
union  gdt_selector_t
 A selector in the GDT. More...
 

Functions

void gdt_init_entry (size_t entry, uint32_t base, uint32_t limit)
 Sets basic parameters of a GDT entry. More...
 
static void gdt_load ()
 Loads the GDT into the GDTR register.
 
void gdt_flush ()
 Loads the kernel code and data segments into the segment registers. More...
 
void gdt_init ()
 Initializes the GDT. More...
 
uint16_t gdt_get_selector (size_t entry)
 Returns a selector ready to be loaded in a segment register. More...
 

Variables

static gdt_entry_t gdt [GDT_ENTRIES]
 The GDT itself. It is located inside the kernel.