StuBS
gdt.h File Reference

The Global Descriptor Table (GDT). More...

#include "types.h"
Include dependency graph for gdt.h:

Classes

struct  GDT::SegmentDescriptor.__unnamed32__
 Fields specific for Data Segment (for debugging purposes) More...
 

Namespaces

namespace  GDT
 Abstracts the GDT that, primarily, contains descriptors to memory segments.
 

Enumerations

enum  Segments {
  SEGMENT_NULL = 0 ,
  SEGMENT_KERNEL_CODE ,
  SEGMENT_KERNEL_DATA
}
 
enum  GDT::Granularity {
  GDT::GRANULARITY_BYTES = 0 ,
  GDT::GRANULARITY_4KBLOCK = 1
}
 Unit of the segment limit. More...
 
enum  GDT::DescriptorType {
  GDT::DESCRIPTOR_SYSTEM = 0 ,
  GDT::DESCRIPTOR_CODEDATA = 1
}
 Descriptor type. More...
 
enum  GDT::Size {
  GDT::SIZE_16BIT = 0 ,
  GDT::SIZE_32BIT = 2 ,
  GDT::SIZE_64BIT = 1
}
 Address width. More...
 

Detailed Description


Class Documentation

◆ GDT::SegmentDescriptor.__unnamed32__

struct GDT::SegmentDescriptor.__unnamed32__

Fields specific for Data Segment (for debugging purposes)

See also
ISDMv3, 3.4.5.1; Code- and Data-Segment Descriptor Types
Class Members
uint64_t __pad0__: 40 Ignored (set via limit_low and base_low)
bool data_accessed: 1 If set, the data segment was used since the last reset of this value.
bool writeable: 1 If set, data is writable (otherwise read only)
bool expand_down: 1 Growing direction for dynamically growing segments.
bool notData: 1 Has to be cleared (false)
uint64_t __pad1__: 9 Ignored (set via privilege_level ... available)
uint64_t reserved: 1 Reserved, always set to 0!
bool big: 1 Size of the stack pointer (false = 16 bit, true = 32 bit)
Warning
Has a different meaning in case expand_down is set to 1.
uint64_t __pad2__: 0 Remainder ignored.