#include <stdint.h>Go to the source code of this file.
Data Structures | |
| struct | cpu_gdt_entry |
| struct | cpu_gdt_register |
Macros | |
| #define | GDT_LONG_MODE 0x20 |
| #define | GDT_PRESENT 0x80 |
| #define | GDT_RING_0 0x00 |
| #define | GDT_RING_1 0x20 |
| #define | GDT_RING_2 0x40 |
| #define | GDT_RING_3 0x60 |
| #define | GDT_CONFORMING 0x04 |
| #define | GDT_SEGMENTS 3 |
| #define | GDT_NULL_OFFSET 0x00 |
| #define | GDT_KCODE 0x08 |
| #define | GDT_KCODE_LIMIT 0 |
| #define | GDT_KCODE_BASE 0 |
| #define | GDT_KCODE_MISC_LOW GDT_PRESENT + GDT_RING_0 |
| #define | GDT_KCODE_MISC_HIGH GDT_LONG_MODE |
| #define | GDT_KDATA 0x10 |
| #define | GDT_KDATA_LIMIT 0 |
| #define | GDT_KDATA_BASE 0 |
| #define | GDT_KDATA_MISC_LOW GDT_PRESENT |
| #define | GDT_KDATA_MISC_HIGH 0 |
| #define | GDT_ENTRY_CREATE(lim, base, low, high) |
Functions | |
| struct cpu_gdt_entry | __attribute__ ((packed)) |
| void | cpu_gdt_bind (void) |
| void | cpu_gdt_describe (char *buf, uint64_t bufsz) |
Variables | |
| uint16_t | limit_low |
| uint16_t | base_low |
| uint8_t | base_med |
| uint8_t | present_dpl_and_conform |
| uint8_t | flags_and_limit_high |
| uint8_t | base_high |
| uint16_t | limit |
| uint64_t | base |
| #define GDT_CONFORMING 0x04 |
| #define GDT_ENTRY_CREATE | ( | lim, | |
| base, | |||
| low, | |||
| high | |||
| ) |
| #define GDT_KCODE 0x08 |
| #define GDT_KCODE_BASE 0 |
| #define GDT_KCODE_LIMIT 0 |
| #define GDT_KCODE_MISC_HIGH GDT_LONG_MODE |
| #define GDT_KCODE_MISC_LOW GDT_PRESENT + GDT_RING_0 |
| #define GDT_KDATA 0x10 |
| #define GDT_KDATA_BASE 0 |
| #define GDT_KDATA_LIMIT 0 |
| #define GDT_KDATA_MISC_HIGH 0 |
| #define GDT_KDATA_MISC_LOW GDT_PRESENT |
| #define GDT_LONG_MODE 0x20 |
| #define GDT_NULL_OFFSET 0x00 |
| #define GDT_PRESENT 0x80 |
| #define GDT_RING_0 0x00 |
| #define GDT_RING_1 0x20 |
| #define GDT_RING_2 0x40 |
| #define GDT_RING_3 0x60 |
| #define GDT_SEGMENTS 3 |
| struct cpu_gdt_entry __attribute__ | ( | (packed) | ) |
| void cpu_gdt_bind | ( | void | ) |
| void cpu_gdt_describe | ( | char * | buf, |
| uint64_t | bufsz | ||
| ) |
| uint64_t base |
| uint8_t base_high |
| uint16_t base_low |
| uint8_t base_med |
| uint8_t flags_and_limit_high |
| uint16_t limit |
| uint16_t limit_low |
| uint8_t present_dpl_and_conform |