2021-02-21 01:24:25 -05:00
|
|
|
#ifndef GDT_H
|
|
|
|
#define GDT_H
|
|
|
|
|
|
|
|
#include "types.h"
|
|
|
|
|
|
|
|
struct GDT {
|
|
|
|
uint32_t limit;
|
|
|
|
uint32_t base;
|
|
|
|
uint8_t type;
|
|
|
|
} __attribute((packed));
|
|
|
|
|
|
|
|
struct GDT_ptr {
|
|
|
|
uint16_t limit;
|
|
|
|
uint32_t base;
|
|
|
|
} __attribute((packed));
|
|
|
|
|
2021-03-01 17:17:24 -05:00
|
|
|
uint8_t gdt_entries[8 * 3]; // (8 bytes per entry) * (num entries)
|
|
|
|
|
|
|
|
void encodeGDT(uint8_t* gdtEntry, struct GDT source);
|
|
|
|
void initializeGDT();
|
2021-02-21 01:24:25 -05:00
|
|
|
#endif //GDT_H
|