PatchworkOS  966e257
A non-POSIX operating system.
Loading...
Searching...
No Matches
gdt.c File Reference
#include <kernel/cpu/gdt.h>
#include <kernel/cpu/tss.h>
#include <kernel/mem/pmm.h>
Include dependency graph for gdt.c:

Go to the source code of this file.

Functions

static gdt_t gdt ALIGNED (PAGE_SIZE)
 
static gdt_segment_t gdt_segment (gdt_access_t access, gdt_flags_t flags)
 
static gdt_long_system_segment_t gdt_long_system_segment (gdt_access_t access, gdt_flags_t flags, uint64_t base, uint32_t limit)
 
void gdt_init (void)
 Initialize the GDT.
 
void gdt_cpu_load (void)
 Load the GDT on the current CPU.
 
void gdt_cpu_tss_load (tss_t *tss)
 Load a TSS into the GDT and load it using the ltr instruction on the current CPU.
 

Function Documentation

◆ ALIGNED()

static gdt_t gdt ALIGNED ( PAGE_SIZE  )
static

◆ gdt_segment()

static gdt_segment_t gdt_segment ( gdt_access_t  access,
gdt_flags_t  flags 
)
static

Definition at line 8 of file gdt.c.

Here is the caller graph for this function:

◆ gdt_long_system_segment()

static gdt_long_system_segment_t gdt_long_system_segment ( gdt_access_t  access,
gdt_flags_t  flags,
uint64_t  base,
uint32_t  limit 
)
static

Definition at line 20 of file gdt.c.

Here is the caller graph for this function: