Update BOOT_DATA structure and use it instead of all the BOOT_* vars.

git-svn-id: svn://kolibrios.org@7132 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
2017-12-17 02:12:53 +00:00
parent b00728a5d1
commit 368d42ffae
18 changed files with 192 additions and 204 deletions

View File

@@ -15,7 +15,7 @@ $Revision$
xor cx, cx
mov es, cx
mov di, BOOT_BIOS_HD
mov di, BOOT_LO.bios_hd
mov byte [es:di-1], cl
cmp [preboot_biosdisk], 1
jnz bdde
@@ -62,7 +62,7 @@ bdds:
jb .noide
cmp word [es:si+1Ah], 0xFFFF
jz .noide
inc byte [es:BOOT_BIOS_HD_CNT]
inc byte [es:BOOT_LO.bios_hd_cnt]
mov al, dl
stosb
push ds
@@ -95,7 +95,7 @@ bdds:
cmp byte [es:si+2Ah], 'B'
jz bddc2
.nousb:
inc byte [es:BOOT_BIOS_HD_CNT]
inc byte [es:BOOT_LO.bios_hd_cnt]
mov al, dl
stosb
xor ax, ax

View File

@@ -17,8 +17,8 @@ $Revision$
xor ebx, ebx
mov es, bx
mov ds, bx
mov di, BOOT_MEMMAP_BLOCKS
mov [BOOT_MEMMAP_BLOCK_CNT], ebx ; no blocks yet
mov di, BOOT_LO.memmap_blocks
mov [BOOT_LO.memmap_block_cnt], ebx ; no blocks yet
mov ecx, 20
mov edx, 'PAMS' ; 'SMAP'
int 15h
@@ -28,13 +28,13 @@ $Revision$
e820_mem_loop:
; cmp byte [di+16], 1 ; ignore non-free areas
; jnz e820_mem_next
inc byte [BOOT_MEMMAP_BLOCK_CNT]
inc byte [BOOT_LO.memmap_block_cnt]
add di, sizeof.e820entry
e820_mem_next:
; consequent calls to fn E820
test ebx, ebx
jz e820_test_done
cmp byte [BOOT_MEMMAP_BLOCK_CNT], MAX_MEMMAP_BLOCKS
cmp byte [BOOT_LO.memmap_block_cnt], MAX_MEMMAP_BLOCKS
jz e820_test_done
mov eax, 0xE820
int 15h