blob: 7ed587ccd81630730d5cf9ef188a701a75274532 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
#ifndef SOURCE_GDT_H
#define SOURCE_GDT_H
#include<types.h>
struct gdt_entry
{
uint16_t limit;
uint16_t base1;
uint8_t base2;
uint8_t access;
uint8_t limit_flags;
uint8_t base3;
} __attribute__((packed));
struct gdt_pointer
{
uint16_t size;
uint32_t offset;
} __attribute__((packed));
void init_gdt_entry(size_t num, uint16_t limit, uint32_t base, uint8_t access, uint8_t limit_flags);
void init_gdt_table(void);
#endif
|