9#ifndef MAX_OS_SYSTEM_GDT_H
10#define MAX_OS_SYSTEM_GDT_H
13#include <common/macros.h>
14#include <system/multiboot.h>
17namespace MaxOS::system {
26 Execute = (1ULL << 43),
27 CodeOrDataSegment = (1ULL << 44),
28 GrowDown = (1ULL << 45),
29 ConformFromLower = (1ULL << 46),
30 Present = (1ULL << 47),
31 LongMode = (1ULL << 53),
Sets up the GDT in the CPU.
void load()
Loads the GDT into the CPU.
gdtr_t gdtr
The GDTR structure.
uint64_t table[7]
The GDT entries.
GlobalDescriptorTable()
Construct a new Global Descriptor Table object and set up the GDT entries and load it into the CPU,...
struct PACKED MaxOS::system::GDTRegister gdtr_t
Alias for GDTRegister struct.
DescriptorFlags
Flags for the GDT entries.
How the CPU stores the GDT.
uint64_t address
The address of the GDT.
uint16_t size
The size of the GDT.