This repository has been archived on 2024-06-25. You can view files and clone it, but cannot push or open issues or pull requests.
rockOS/kernel/include/rockos/gdt.h

22 lines
385 B
C
Raw Normal View History

2022-07-20 02:23:23 +03:00
#ifndef _ROCKOS_GDT_H
#define _ROCKOS_GDT_H
2022-07-18 18:14:20 +03:00
#include <stdint.h>
#define GDT_ENTRIES 0x6
typedef struct {
uint16_t limit;
uint32_t base;
2022-07-19 11:47:14 +03:00
} __attribute__((packed)) gdtr_t;
2022-07-18 18:14:20 +03:00
typedef struct {
2022-07-19 11:47:14 +03:00
uint16_t limit_low;
uint16_t base_low;
2022-07-18 18:14:20 +03:00
uint8_t base_mid;
uint8_t access;
uint8_t limit_hi_flags;
2022-07-19 11:47:14 +03:00
uint8_t base_high;
} __attribute__((packed)) gdt_entry_t;
2022-07-18 18:14:20 +03:00
2022-07-19 11:47:14 +03:00
#endif