diff options
| author | Michal Idziorek <m.i@gmx.at> | 2014-11-22 15:46:24 +0100 |
|---|---|---|
| committer | Michal Idziorek <m.i@gmx.at> | 2014-11-22 15:46:24 +0100 |
| commit | 795b1f7df203ae33e1d0eb13612f0ba2abf4351e (patch) | |
| tree | 42c4d8f94b6e7a9815ea5b3fe52a251d004d4b87 /boot2 | |
| parent | 4ef54112ec3d3772cb97984a26c85299b8065316 (diff) | |
fix / workaround for my ELF binaries
Diffstat (limited to 'boot2')
| -rw-r--r-- | boot2/disk_load_16.asm | 2 | ||||
| -rw-r--r-- | boot2/stage2.asm | 6 |
2 files changed, 5 insertions, 3 deletions
diff --git a/boot2/disk_load_16.asm b/boot2/disk_load_16.asm index 52912f4..f326bec 100644 --- a/boot2/disk_load_16.asm +++ b/boot2/disk_load_16.asm @@ -90,7 +90,7 @@ disk_load_lba: add bx,0x0800 mov ax,[LBA] - add ax,64 ; 64 sectors = 0x2000*4 bytes ;16 sectors this is 0x200*0x10 butes + add ax,64 ; 64 sectors = 0x2000*4 bytes mov [LBA],ax cmp bx,0x9000 diff --git a/boot2/stage2.asm b/boot2/stage2.asm index ad1e4ea..3a469e8 100644 --- a/boot2/stage2.asm +++ b/boot2/stage2.asm @@ -42,6 +42,7 @@ MEMMAP_OFFSET equ 0x7c01 VESA_MODES equ 0x9300 ; do NOT overwrite yourself! be careful! VESA_MODE_INFO equ 0x9400 VESA_MODE_SELECT equ 0x4114 +CHUNKS_TO_LOAD equ 0x0a ;number of 0x8000 * 512 byte chunks to load into ram ; jmp boot_16 ;start boot process @@ -145,7 +146,7 @@ kernel_load: ; init vesa on last iteration! mov ax,[KERNEL_CHUNK] - cmp ax,0x5 + cmp ax,(CHUNKS_TO_LOAD-1) jne skip_vesa_init %ifndef FOOLOS_CONSOLE @@ -177,7 +178,8 @@ boot_32_pm: mov [KERNEL_CHUNK],ax ;check if all chunkgs loaded (hardcoded to 0x6 for a start) - cmp ax,0x6 + ;each chunk is 0x8000 * 15 bytes + cmp ax,CHUNKS_TO_LOAD je finish_load ; show KERNEL CHUNK value |
