1,6 → 1,6 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
;; ;; |
;; Copyright (C) KolibriOS team 2009-2015. All rights reserved. ;; |
;; Copyright (C) KolibriOS team 2009-2017. All rights reserved. ;; |
;; Distributed under terms of the GNU General Public License ;; |
;; ;; |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
17,25 → 17,25 |
xor ebx, ebx |
mov es, bx |
mov ds, bx |
mov di, 0x9104 |
mov [di-4], ebx ; no blocks yet |
mov di, BOOT_MEMMAP_BLOCKS |
mov [BOOT_MEMMAP_BLOCK_CNT], ebx ; no blocks yet |
mov ecx, 20 |
mov edx, 0x534D4150 |
mov edx, 'PAMS' ; 'SMAP' |
int 15h |
jc no_E820 |
cmp eax, 0x534D4150 |
cmp eax, 'PAMS' |
jnz no_E820 |
e820_mem_loop: |
; cmp byte [di+16], 1 ; ignore non-free areas |
; jnz e820_mem_next |
inc byte [0x9100] |
add di, 20 |
inc byte [BOOT_MEMMAP_BLOCK_CNT] |
add di, sizeof.e820entry |
e820_mem_next: |
; consequent calls to fn E820 |
test ebx, ebx |
jz e820_test_done |
cmp byte [0x9100], 32 |
jae e820_test_done |
cmp byte [BOOT_MEMMAP_BLOCK_CNT], MAX_MEMMAP_BLOCKS |
jz e820_test_done |
mov eax, 0xE820 |
int 15h |
jc e820_test_done |