Add some source code for GDT and resources
This commit is contained in:
parent
a9aec79de3
commit
78f219c0ec
5 changed files with 37 additions and 1 deletions
22
kernel/GDT/gdt.h
Normal file
22
kernel/GDT/gdt.h
Normal file
|
@ -0,0 +1,22 @@
|
|||
#ifndef __GDT__
|
||||
#define __GDT__
|
||||
|
||||
#include "../Types/types.h"
|
||||
|
||||
struct gdtPointer{
|
||||
u16 size;
|
||||
u32 segment;
|
||||
} __attribute__ ((packed));
|
||||
|
||||
struct gdtDescriptor{
|
||||
u16 limit1;
|
||||
u16 base1;
|
||||
u8 base2;
|
||||
u8 type : 4;
|
||||
u8 param1 : 4;
|
||||
u8 limit2 : 4;
|
||||
u8 param2 : 4;
|
||||
u8 base3;
|
||||
} __attribute__ ((packed));
|
||||
|
||||
#endif
|
Loading…
Add table
Add a link
Reference in a new issue