| 1 |
|
| 2 |
|
| 3 |
#ifndef CPU_X86_GDT |
| 4 |
#define CPU_X86_GDT |
| 5 |
|
| 6 |
#ifndef __ASSEMBLER__ |
| 7 |
|
| 8 |
extern char gdt[]; |
| 9 |
extern char per_cpu_segment_descriptors[]; |
| 10 |
extern uint32_t per_cpu_segment_selector; |
| 11 |
extern char gdt_end[]; |
| 12 |
extern char idtarg[]; |
| 13 |
#endif |
| 14 |
|
| 15 |
|
| 16 |
#define GDT_CODE_SEG 0x08 |
| 17 |
#define GDT_DATA_SEG 0x10 |
| 18 |
#define GDT_CODE_SEG64 0x18 |
| 19 |
|
| 20 |
|
| 21 |
|
| 22 |
|
| 23 |
|
| 24 |
#define GDT_TASK_STATE_SEG 0x20 |
| 25 |
|
| 26 |
#define GDT_CODE16_SEG 0x28 |
| 27 |
#define GDT_DATA16_SEG 0x30 |
| 28 |
#define GDT_DATA_ACPI_SEG 0x38 |
| 29 |
|
| 30 |
#endif |