diff options
| author | Michal Idziorek <m.i@gmx.at> | 2014-08-07 13:20:26 +0200 |
|---|---|---|
| committer | Michal Idziorek <m.i@gmx.at> | 2014-08-07 13:20:26 +0200 |
| commit | 0246dfba3efac4c20e73e83c229219d3c136ff40 (patch) | |
| tree | 3cb1ffc62d78f054ac8f82998e1da518294488b2 /boot/mbr.asm | |
| parent | c8a976eced96f3af4a17d756c34cdd566ffa8a9e (diff) | |
getting memory map from bios and passing to kernel
Diffstat (limited to 'boot/mbr.asm')
| -rw-r--r-- | boot/mbr.asm | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/boot/mbr.asm b/boot/mbr.asm index 12b7707..d4dcbe5 100644 --- a/boot/mbr.asm +++ b/boot/mbr.asm @@ -26,16 +26,15 @@ KERNEL_OFFSET equ 0x1000 jmp boot_16 ;start boot process ;SOME Global Data, mainly strings -STR_VERSION: +;STR_VERSION: ; db "v0.2~",0 -STR_PROT: +;STR_PROT: ; db "32-bit PM",0 -STR_LOADED: +;STR_LOADED: ; db "loaded",0 BOOT_DRIVE: db 0 - ;lets put our temporary GDT (Global Descriptor Table) here %include "boot/GDT.asm" @@ -81,6 +80,13 @@ boot_16: ; mov bx, STR_LOADED ; call print_string + + ;get memory map from biso before we enter 32 bit protected mode + ; todo: how to set es!?!? + ;mov es,0 + mov di,MEMMAP + call BiosGetMemoryMap + ;finally lets enter Protected mode!!! call switch_to_pm @@ -88,6 +94,8 @@ boot_16: [bits 32] boot_32_pm: +; we could do ALL This inside the kernel!!! + ;print info message that we are in protected mode! ; mov ecx,160 ; mov ebx,STR_PROT @@ -105,6 +113,10 @@ boot_32_pm: call KERNEL_OFFSET ;jump into our Kernel it +db 'X' +MEMMAP: + + ;idt_descriptor: ; dw idt_end-idt_start-1 |
