# gdt.h File Reference

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

## Data Structures

union | descriptorTableUnion
struct | gdtDescriptor
struct | gdtGate

## Defines

#define | dAcc 0x100
#define | dBig 0x40
#define | dBiglim 0x80
#define | dBusy 0xB00
#define | dCall 0x0C00
#define | dCode 0x1800
#define | dConform 0x400
#define | dData 0x1000
#define | dDpl0 0x0000
#define | dDpl1 0x2000
#define | dDpl2 0x4000
#define | dDpl3 0x6000
#define | dEexdown 0x400
#define | dInt 0x0E00
#define | dLdt 0x200
#define | dNpresent 0x8000
#define | dPresent 0x8000
#define | dRead 0x200
#define | dTask 0x500
#define | dTrap 0x0F00
#define | dTss 0x900
#define | dWrite 0x200
#define | ubixDescriptorTable(name, length) union descriptorTableUnion name[length] =
#define | ubixGateDescriptor(offset, selector, control)
#define | ubixStandardDescriptor(base, limit, control)

## Variables

gdtGate | packed
gdtDescriptor | packed
descriptorTableUnion | ubixGDT [9]

## Define Documentation

#define dAcc 0x100

Definition at line 50 of file gdt.h.

#define dBig 0x40

Definition at line 56 of file gdt.h.

Referenced by ubixDescriptorTable().

#define dBiglim 0x80

Definition at line 57 of file gdt.h.

Referenced by ubixDescriptorTable().

#define dBusy 0xB00

Definition at line 53 of file gdt.h.

#define dCall 0x0C00

Definition at line 34 of file gdt.h.

#define dCode 0x1800

Definition at line 35 of file gdt.h.

Referenced by ubixDescriptorTable().

#define dConform 0x400

Definition at line 55 of file gdt.h.

#define dData 0x1000

Definition at line 36 of file gdt.h.

Referenced by ubixDescriptorTable().

#define dDpl0 0x0000

Definition at line 47 of file gdt.h.

Referenced by atkbd_init(), idt_init(), and ne2k_init().

#define dDpl1 0x2000

Definition at line 46 of file gdt.h.

#define dDpl2 0x4000

Definition at line 45 of file gdt.h.

#define dDpl3 0x6000

Definition at line 44 of file gdt.h.

Referenced by idt_init(), initLNC(), mouseInit(), and ubixDescriptorTable().

#define dEexdown 0x400

Definition at line 54 of file gdt.h.

#define dInt 0x0E00

Definition at line 37 of file gdt.h.

Referenced by atkbd_init(), fdc_init(), idt_init(), initLNC(), mouseInit(), and ne2k_init().

#define dLdt 0x200

Definition at line 38 of file gdt.h.

Referenced by ubixDescriptorTable().

#define dNpresent 0x8000

Definition at line 49 of file gdt.h.

#define dPresent 0x8000

Definition at line 48 of file gdt.h.

Referenced by atkbd_init(), fdc_init(), idt_init(), initLNC(), mouseInit(), and ne2k_init().

#define dRead 0x200

Definition at line 52 of file gdt.h.

Referenced by ubixDescriptorTable().

#define dTask 0x500

Definition at line 39 of file gdt.h.

Referenced by idt_init().

#define dTrap 0x0F00

Definition at line 40 of file gdt.h.

Referenced by idt_init().

#define dTss 0x900

Definition at line 41 of file gdt.h.

Referenced by ubixDescriptorTable().

#define dWrite 0x200

Definition at line 51 of file gdt.h.

Referenced by ubixDescriptorTable().

#define ubixDescriptorTable | ( | name,
|  | length |  | ) | union descriptorTableUnion name[length] =

Definition at line 84 of file gdt.h.

#define ubixGateDescriptor | ( | offset,
|  | selector,
|  | control |  | ) |

Value:

    {gate: {(offset & 0xffff), selector, \
                                                         (control+dPresent), (offset >> 16) }}

Definition at line 93 of file gdt.h.

#define ubixStandardDescriptor | ( | base,
|  | limit,
|  | control |  | ) |

Value:

    {descriptor: \
                                                   {(limit & 0xffff), \
                                                   (base & 0xffff), \
                                                   ((base >> 16) & 0xff), \
                                                   ((control+dPresent) >> 8), \
                                                   (limit >> 16), \
                                                   ((control & 0xff) >> 4), \
                                                   (base >> 24)}}

Definition at line 85 of file gdt.h.

Referenced by ubixDescriptorTable().

## Variable Documentation

struct gdtGate packed

struct gdtDescriptor packed

union descriptorTableUnion ubixGDT[9]