summaryrefslogtreecommitdiff
path: root/boot/stage2.asm
diff options
context:
space:
mode:
authorMichal Idziorek <m.i@gmx.at>2014-09-05 09:34:53 +0200
committerMichal Idziorek <m.i@gmx.at>2014-09-05 09:34:53 +0200
commitc245268812a63bae0610de9a416dc7de97edde07 (patch)
tree1f3707e9d53fbf1d3265feb138d499a58b03cf69 /boot/stage2.asm
parentb75c10c9d8c7405ba2f89724b485154d5201c404 (diff)
Moved kernel and reclaimed ACPI memory
finally our 2 stage bootloader also works with LBA loading via BIOS
Diffstat (limited to 'boot/stage2.asm')
-rw-r--r--boot/stage2.asm12
1 files changed, 5 insertions, 7 deletions
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!