From 3bfcc9b988b3bcd041fcd596fe99124629fda789 Mon Sep 17 00:00:00 2001 From: "Evgeny Grechnikov (Diamond)" Date: Fri, 25 Dec 2009 22:47:29 +0000 Subject: [PATCH] init_page_map fixed git-svn-id: svn://kolibrios.org@1331 a494cfbc-eb01-0410-851d-a64ba20cac60 --- kernel/trunk/init.inc | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/kernel/trunk/init.inc b/kernel/trunk/init.inc index 54aa7b5978..02e94791e9 100644 --- a/kernel/trunk/init.inc +++ b/kernel/trunk/init.inc @@ -205,19 +205,18 @@ proc init_page_map 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 @@ proc init_page_map 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