From c245268812a63bae0610de9a416dc7de97edde07 Mon Sep 17 00:00:00 2001 From: Michal Idziorek Date: Fri, 5 Sep 2014 09:34:53 +0200 Subject: Moved kernel and reclaimed ACPI memory finally our 2 stage bootloader also works with LBA loading via BIOS --- boot/stage2.asm | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'boot/stage2.asm') diff --git a/boot/stage2.asm b/boot/stage2.asm index de2497e..a1dbb46 100644 --- a/boot/stage2.asm +++ b/boot/stage2.asm @@ -37,16 +37,13 @@ ;;where we will load our kernel into memory and some ;;other memory locations ; -KERNEL_DATA equ 10 ;sector on disk where the kernel starts -KERNEL_SECTOR equ 0x1000 -KERNEL_OFFSET equ 0x0000 - MEMMAP_SIZE_OFFSET equ 0x7c00 MEMMAP_OFFSET equ 0x7c01 VESA_MODES equ 0x8300 VESA_MODE_INFO equ 0x8400 VESA_MODE_SELECT equ 0x4114 ; + jmp boot_16 ;start boot process ;;SOME Global Data, mainly info/error strings @@ -55,9 +52,9 @@ BOOT_DRIVE: STR_VERSION: db "Fool Loader Stage 2 v0.5",0 -STR_LOAD +STR_LOAD: db "Loading Kernel...",0 -STR_BOOT +STR_BOOT: db "Boot Drive: ",0 MEMMAP_INFO: db "Getting Memory Map from BIOS.",0 @@ -112,6 +109,7 @@ boot_16: mov bx,MEMMAP_INFO call print_string call print_nextline + ;get memory map from bios before we enter 32 bit protected mode mov ax,0 ; set target address in es:di (0:offset) mov es,ax @@ -137,5 +135,5 @@ boot_32_pm: ; call kernel! mov eax,0 ;tell the kernel ; we are the booting processor - call 0x10000 ;jump into our Kernel! + call 0x18000 ;jump into our Kernel! -- cgit v1.2.3