init_page_map fixed

git-svn-id: svn://kolibrios.org@1331 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Evgeny Grechnikov (Diamond) 2009-12-25 22:47:29 +00:00
parent 90bb6a20e2
commit 3bfcc9b988

View File

@ -205,19 +205,18 @@ proc init_page_map
mov edi, [ebx] mov edi, [ebx]
shr edi, 12 ; edi = first page shr edi, 12 ; edi = first page
mov eax, edi mov eax, edi
neg eax
shr edi, 5 shr edi, 5
shl edi, 2
add edi, sys_pgmap-OS_BASE add edi, sys_pgmap-OS_BASE
and eax, 31 and eax, 31
jz .startok jz .startok
sub ecx, eax add ecx, eax
sub ecx, 32
jbe .onedword jbe .onedword
push ecx push ecx
mov ecx, eax mov ecx, eax
xor eax, eax or eax, -1
inc eax
shl eax, cl shl eax, cl
dec eax
or [edi], eax or [edi], eax
add edi, 4 add edi, 4
pop ecx pop ecx
@ -228,15 +227,17 @@ proc init_page_map
rep stosd rep stosd
pop ecx pop ecx
and ecx, 31 and ecx, 31
not eax neg eax
shl eax, cl shl eax, cl
dec eax
or [edi], eax or [edi], eax
jmp .next jmp .next
.onedword: .onedword:
add ecx, eax add ecx, 32
sub ecx, eax
@@: @@:
dec eax
bts [edi], eax bts [edi], eax
inc eax
loop @b loop @b
.next: .next:
add ebx, 20 add ebx, 20