diff options
| author | manzerbredes <loic.guegan_secondary@yahoo.fr> | 2015-07-20 12:37:21 +0400 |
|---|---|---|
| committer | manzerbredes <loic.guegan_secondary@yahoo.fr> | 2015-07-20 12:37:21 +0400 |
| commit | 78f219c0ec049a08312896fdb1194ce03a54769a (patch) | |
| tree | faf1eab7648626ce1f7a7ffe587aa4842e6e1cc8 | |
| parent | a9aec79de34cae9e7481b21b22bb3926f4ad407e (diff) | |
Add some source code for GDT and resources
| -rw-r--r-- | kernel/GDT/gdt.h | 22 | ||||
| -rw-r--r-- | kernel/Makefile | 2 | ||||
| -rw-r--r-- | kernel/Types/types.h | 14 | ||||
| -rw-r--r-- | resources/RAM_Organisation.jpg | bin | 0 -> 259239 bytes | |||
| -rw-r--r-- | resources/RAM_Organisation.xcf | bin | 0 -> 884236 bytes |
5 files changed, 37 insertions, 1 deletions
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 Binary files differnew file mode 100644 index 0000000..bee1281 --- /dev/null +++ b/resources/RAM_Organisation.jpg diff --git a/resources/RAM_Organisation.xcf b/resources/RAM_Organisation.xcf Binary files differnew file mode 100644 index 0000000..90c5008 --- /dev/null +++ b/resources/RAM_Organisation.xcf |
