Max OS 0.3
Loading...
Searching...
No Matches
gdt.h File Reference

Defines a Global Descriptor Table (GDT) for setting up memory segments in protected mode. More...

#include <cstdint>
#include <common/macros.h>
#include <system/multiboot.h>

Go to the source code of this file.

Classes

struct  MaxOS::system::GDTRegister
 How the CPU stores the GDT. More...
 
class  MaxOS::system::GlobalDescriptorTable
 Sets up the GDT in the CPU. More...
 

Typedefs

typedef struct PACKED MaxOS::system::GDTRegister MaxOS::system::gdtr_t
 Alias for GDTRegister struct.
 

Enumerations

enum class  MaxOS::system::DescriptorFlags : uint64_t {
  Write = (1ULL << 41) , Execute = (1ULL << 43) , CodeOrDataSegment = (1ULL << 44) , GrowDown = (1ULL << 45) ,
  ConformFromLower = (1ULL << 46) , Present = (1ULL << 47) , LongMode = (1ULL << 53)
}
 Flags for the GDT entries. More...
 

Detailed Description

Defines a Global Descriptor Table (GDT) for setting up memory segments in protected mode.

Date
3rd October 2022
Author
Max Tyson

Definition in file gdt.h.

Enumeration Type Documentation

◆ DescriptorFlags

enum class MaxOS::system::DescriptorFlags : uint64_t
strong

Flags for the GDT entries.

DescriptorFlags

Definition at line 24 of file gdt.h.

24 : uint64_t {
25 Write = (1ULL << 41),
26 Execute = (1ULL << 43),
27 CodeOrDataSegment = (1ULL << 44),
28 GrowDown = (1ULL << 45),
29 ConformFromLower = (1ULL << 46),
30 Present = (1ULL << 47),
31 LongMode = (1ULL << 53),
32 };