miniOS
x86_64 hobby kernel with SMP, VFS, and POSIX process model
Loading...
Searching...
No Matches
gdt.c File Reference
Include dependency graph for gdt.c:

Functions

void gdt64_load (void *gdt_desc, uint16_t cs, uint16_t ds)
void gdt_init ()
void tss_set_rsp0 (uint64_t rsp0)

Variables

void * interrupt_stack_top
struct tss_struct tss
struct segment_descriptor GDT []

Function Documentation

◆ gdt64_load()

void gdt64_load ( void * gdt_desc,
uint16_t cs,
uint16_t ds )
Here is the caller graph for this function:

◆ gdt_init()

void gdt_init ( )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ tss_set_rsp0()

void tss_set_rsp0 ( uint64_t rsp0)

Variable Documentation

◆ GDT

struct segment_descriptor GDT[]
Initial value:
= {
{ 0, },
BUILD_4KB_SEG_DESC(0, 0x000FFFFF, GDT_CS_TYPE, 1, 0),
BUILD_4KB_SEG_DESC(0, 0x000FFFFF, GDT_DS_TYPE, 0, 1),
BUILD_4KB_SEG_DESC(0, 0x000FFFFF, USER_DS_TYPE, 0, 1),
BUILD_4KB_SEG_DESC(0, 0x000FFFFF, USER_CS_TYPE, 1, 0),
{ 0, },
{ 0, }
}
#define GDT_DS_TYPE
Definition segment.h:42
#define USER_DS_TYPE
Definition segment.h:47
#define USER_CS_TYPE
Definition segment.h:46
#define GDT_CS_TYPE
Definition segment.h:41
#define BUILD_4KB_SEG_DESC(base_addr, limit, access, long_mode, size)
Definition segment.h:132

◆ interrupt_stack_top

void* interrupt_stack_top
extern

◆ tss

struct tss_struct tss