24#ifndef KERNEL_ARCH_I686_GDT_H
25#define KERNEL_ARCH_I686_GDT_H
27#include <kernel/types.h>
29#include <utils/compiler.h>
32#define GDT_TSS_BASE_ADDRESS 0x00000000UL
void gdt_load_segment(gdt_descriptor, u16 index)
Load a segment descriptor into the Global Descriptor Table.
Definition: gdt.c:67
void gdt_log(void)
Print the content of the GDT and GDTR.
Definition: gdt.c:85
void gdt_set_esp0(u32)
Modify the kernel stack pointer inside the current TSS.
Definition: gdt.c:116
void gdt_init(void)
Initialize the GDTR and GDT.
Definition: gdt.c:35
@ GDT_ENTRY_KERNEL_CODE
Required NULL segment.
Definition: gdt.h:39
@ GDT_ENTRY_TSS
User data segment.
Definition: gdt.h:43
@ GDT_ENTRY_USER_CODE
Kernel data segment.
Definition: gdt.h:41
@ GDT_ENTRY_USER_DATA
User code segment.
Definition: gdt.h:42
@ GDT_ENTRY_KERNEL_DATA
Kernel code segment.
Definition: gdt.h:40
Structure of the page fault's error code https://wiki.osdev.org/Exceptions#Page_Fault.
Definition: mmu.c:587
A single entry inside the GDT.
Definition: gdt.h:60
The GDT is pointed to by the value in the GDTR register.
Definition: gdt.h:51
Segment.
Definition: gdt.h:77
Identifies a segment inside the GDT or LDT.
Definition: gdt.h:124