diff --git a/kernel/GDT/gdt.h b/kernel/GDT/gdt.h new file mode 100644 index 0000000..3df5698 --- /dev/null +++ b/kernel/GDT/gdt.h @@ -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 diff --git a/kernel/Makefile b/kernel/Makefile index 02c92c2..8b0c1bf 100644 --- a/kernel/Makefile +++ b/kernel/Makefile @@ -1,6 +1,6 @@ kernel.bin:entry.o main.o - ld -m elf_i386 --entry=_start -Ttext=0x1000 -o $@ $^ + ld -m elf_i386 --entry=_start -Ttext=0x100000 -o $@ $^ entry.o:entry.asm nasm -f elf $^ diff --git a/kernel/Types/types.h b/kernel/Types/types.h new file mode 100644 index 0000000..a6f334e --- /dev/null +++ b/kernel/Types/types.h @@ -0,0 +1,14 @@ +#ifndef __types__ +#define __types__ + +//Byte : +typedef unsigned char u8; + +//Word : +typedef unsigned short u16; + +//Double Word : +typedef unsigned long int u32; + + +#endif diff --git a/resources/RAM_Organisation.jpg b/resources/RAM_Organisation.jpg new file mode 100644 index 0000000..bee1281 Binary files /dev/null and b/resources/RAM_Organisation.jpg differ diff --git a/resources/RAM_Organisation.xcf b/resources/RAM_Organisation.xcf new file mode 100644 index 0000000..90c5008 Binary files /dev/null and b/resources/RAM_Organisation.xcf differ