/kernel/branches/Kolibri-acpi/core/memory.inc |
8,6 → 8,7 |
$Revision$ |
|
|
|
align 4 |
proc alloc_page |
|
1554,3 → 1555,27 |
.fail: |
ret |
endp |
|
|
align 4 |
print_mem: |
mov edi, BOOT_VAR + 0x9104 |
mov ecx, [edi-4] |
test ecx, ecx |
jz .done |
|
@@: |
mov eax, [edi] |
mov edx, [edi+4] |
add eax, [edi+8] |
adc edx, [edi+12] |
|
DEBUGF 1, "K : E820 %x%x - %x%x type %d\n", \ |
[edi+4], [edi],\ |
edx, eax, [edi+16] |
add edi, 20 |
dec ecx |
jnz @b |
.done: |
ret |
|
/kernel/branches/Kolibri-acpi/detect/biosmem.inc |
23,8 → 23,8 |
cmp eax, 0x534D4150 |
jnz no_E820 |
e820_mem_loop: |
cmp byte [di+16], 1 ; ignore non-free areas |
jnz e820_mem_next |
; cmp byte [di+16], 1 ; ignore non-free areas |
; jnz e820_mem_next |
inc byte [0x9100] |
add di, 20 |
e820_mem_next: |
/kernel/branches/Kolibri-acpi/init.inc |
45,8 → 45,12 |
ret |
endp |
|
|
align 4 |
proc init_mem |
|
xchg bx, bx |
|
; calculate maximum allocatable address and number of allocatable pages |
mov edi, BOOT_VAR-OS_BASE + 0x9104 |
mov ecx, [edi-4] |
55,6 → 59,9 |
.calcmax: |
; round all to pages |
mov eax, [edi] |
cmp [edi+16], byte 1 |
jne .unusable |
|
test eax, 0xFFF |
jz @f |
neg eax |