kernel PTE initialization bug fixed

git-svn-id: svn://kolibrios.org@1451 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Artem Jerdev (art_zh) 2010-04-16 21:47:03 +00:00
parent 90d7119b99
commit 0d32c5bfec

View File

@ -139,14 +139,10 @@ proc init_mem
dec [pg_data.kernel_tables-OS_BASE] dec [pg_data.kernel_tables-OS_BASE]
mov [edx], eax mov [edx], eax
add eax, 0x00400000
add edx, 4 add edx, 4
mov eax, 0x400000+PG_SW mov edi, [tmp_page_tabs]
mov ecx, [tmp_page_tabs] jmp .map_kernel_heap ; new kernel fits to the first 4Mb - nothing to do with ".map_low"
sub ecx, 0x400000
shr ecx, 12 ;ecx/=4096
jmp .map_low
.no_PSE: .no_PSE:
mov eax, PG_SW mov eax, PG_SW
mov ecx, [tmp_page_tabs] mov ecx, [tmp_page_tabs]
@ -159,6 +155,7 @@ proc init_mem
dec ecx dec ecx
jnz @B jnz @B
.map_kernel_heap:
mov ecx, [pg_data.kernel_tables-OS_BASE] mov ecx, [pg_data.kernel_tables-OS_BASE]
shl ecx, 10 shl ecx, 10
xor eax, eax xor eax, eax
@ -170,7 +167,6 @@ proc init_mem
mov edi, edx mov edi, edx
.map_kernel_tabs: .map_kernel_tabs:
stosd stosd
add eax, 0x1000 add eax, 0x1000
dec ecx dec ecx