114,9 → 114,9 |
mov edx, (OS_BASE/4096) |
jmp .set |
@@: |
cmp edx, (HEAP_BASE+HEAP_MIN_SIZE)/4096 |
cmp edx, (HEAP_BASE-OS_BASE+HEAP_MIN_SIZE)/4096 |
jae .set |
mov edx, (HEAP_BASE+HEAP_MIN_SIZE)/4096 |
mov edx, (HEAP_BASE-OS_BASE+HEAP_MIN_SIZE)/4096 |
.set: |
mov [pg_data.kernel_pages-OS_BASE], edx |
shr edx, 10 |
205,19 → 205,18 |
mov edi, [ebx] |
shr edi, 12 ; edi = first page |
mov eax, edi |
neg eax |
shr edi, 5 |
shl edi, 2 |
add edi, sys_pgmap-OS_BASE |
and eax, 31 |
jz .startok |
sub ecx, eax |
add ecx, eax |
sub ecx, 32 |
jbe .onedword |
push ecx |
mov ecx, eax |
xor eax, eax |
inc eax |
or eax, -1 |
shl eax, cl |
dec eax |
or [edi], eax |
add edi, 4 |
pop ecx |
228,15 → 227,17 |
rep stosd |
pop ecx |
and ecx, 31 |
not eax |
neg eax |
shl eax, cl |
dec eax |
or [edi], eax |
jmp .next |
.onedword: |
add ecx, eax |
add ecx, 32 |
sub ecx, eax |
@@: |
dec eax |
bts [edi], eax |
inc eax |
loop @b |
.next: |
add ebx, 20 |