high kernel

git-svn-id: svn://kolibrios.org@394 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Sergey Semyonov (Serge)
2007-03-06 19:26:52 +00:00
parent ecc2925f76
commit 87fc474bee
10 changed files with 49 additions and 46 deletions

View File

@@ -972,9 +972,7 @@ malloc_large:
align 4
init_malloc:
stdcall kernel_alloc, 0x20000
mov [mst.top], eax
mov [mst.topsize], 128*1024
mov dword [eax+4], (128*1024) or 1

View File

@@ -476,19 +476,17 @@ proc page_fault_handler
mov ebx, [ebp-4]
cmp ebx, 0x80000000
jae .user_space
jae .kernel_space
cmp ebx, page_tabs+0x800
jae .tab_space
cmp ebx, app_page_tabs
jae .alloc
cmp ebx, page_tabs
jae .tab_space
cmp ebx, 0x7DC00000
jae .lfb_addr
jmp .kernel_space
.user_space:
shr ebx, 12
mov ecx, ebx

View File

@@ -392,19 +392,20 @@ proc create_app_space stdcall, app_size:dword,img_base:dword,img_size:dword
mov [dir_addr], eax
stdcall map_page,[tmp_task_pdir],eax,dword PG_SW
mov esi, sys_pgdir
mov edi, [tmp_task_pdir]
mov ecx, (page_tabs shr 20)/4
mov ecx, (LFB_BASE shr 20)/4 ;(page_tabs shr 20)/4
xor eax, eax
rep stosd
mov esi, sys_pgdir+(LFB_BASE shr 20) ;(OS_BASE shr 20)
mov ecx, (OS_BASE shr 20)/4
cld
rep movsd
mov edi, [tmp_task_pdir]
mov eax, [dir_addr]
or eax, PG_SW
stosd ; [(page_tabs shr 20)]= eax
mov ecx, 0x800/4
xor eax, eax
rep stosd
mov [edi+(page_tabs shr 20)], eax
mov eax, [dir_addr]
call set_cr3
@@ -471,7 +472,6 @@ else
add edx, 0x1000
dec [app_pages]
jnz .alloc
end if
.done:
@@ -557,8 +557,7 @@ proc destroy_app_space stdcall, pg_dir:dword
and eax, not 0xFFF
stdcall map_page,[tmp_task_pdir],eax,dword PG_SW
mov esi, [tmp_task_pdir]
add esi, 0x800
mov edi, 0x800/4
mov edi, (LFB_BASE shr 20)/4
.destroy:
mov eax, [esi]
test eax, 1