MentOS  0.8.0
The Mentoring Operating System
Macros | Functions | Variables
gdt.c File Reference

Functions which manage the Global Descriptor Table (GDT). More...

Macros

#define __DEBUG_HEADER__   "[GDT ]"
 Change header.
 
#define __DEBUG_LEVEL__   LOGLEVEL_NOTICE
 Set log level.
 
#define GDT_SIZE   10
 The maximum dimension of the GDT.
 

Functions

void gdt_flush (uint32_t _gdt_pointer)
 This will be a function in gdt.s. We use this to properly reload the new segment registers. More...
 
void init_gdt (void)
 Initialise the GDT. More...
 
void gdt_set_gate (uint8_t index, uint32_t base, uint32_t limit, uint8_t access, uint8_t granul)
 Sets the value of one GDT entry. More...
 

Variables

gdt_descriptor_t gdt [GDT_SIZE]
 The GDT itself.
 
gdt_pointer_t gdt_pointer
 Pointer structure to give to the CPU.
 

Detailed Description

Functions which manage the Global Descriptor Table (GDT).

Function Documentation

◆ gdt_flush()

void gdt_flush ( uint32_t  _gdt_pointer)

This will be a function in gdt.s. We use this to properly reload the new segment registers.

Parameters
_gdt_pointeraddresss of the gdt.