rename pages_tab -> page_tabs

git-svn-id: svn://kolibrios.org@365 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Sergey Semyonov (Serge) 2007-02-20 12:05:24 +00:00
parent b000e7656d
commit c3f06c82fb
4 changed files with 32 additions and 32 deletions

View File

@ -230,7 +230,7 @@ draw_data equ 0x988000
HEAP_BASE equ 0x98B000
pages_tab equ 0x60000000
page_tabs equ 0x60000000
master_tab equ 0x60180000
current_pgdir equ 0x60180000

View File

@ -640,7 +640,7 @@ proc init_heap
mov ecx, eax
sub eax, 4096
or ecx, FREE_BLOCK
mov [pages_tab+esi], ecx
mov [page_tabs+esi], ecx
ret
.exit:
xor eax, eax
@ -666,7 +666,7 @@ l_0:
mov ebx, esi
shr ebx, 12
mov eax, [pages_tab+ebx*4]
mov eax, [page_tabs+ebx*4]
test eax, FREE_BLOCK
jz test_used
and eax, 0xFFFFF000
@ -679,16 +679,16 @@ l_0:
sub eax, ecx;
or eax, FREE_BLOCK
shr edx, 12
mov [pages_tab+edx*4], eax
mov [page_tabs+edx*4], eax
@@:
or ecx, USED_BLOCK
mov [pages_tab+ebx*4], ecx
mov [page_tabs+ebx*4], ecx
shr ecx, 12
dec ecx
inc ebx
@@:
mov dword [pages_tab+ebx*4], 2
mov dword [page_tabs+ebx*4], 2
inc ebx
dec ecx
jnz @B
@ -730,21 +730,21 @@ proc user_free stdcall, base:dword
xor ebx, ebx
sub esi, 4096
shr esi, 12
mov eax, [pages_tab+esi*4]
mov eax, [page_tabs+esi*4]
test eax, USED_BLOCK
jz .not_used
and eax, not 4095
mov ecx, eax
or eax, FREE_BLOCK
mov [pages_tab+esi*4], eax
mov [page_tabs+esi*4], eax
inc esi
sub ecx, 4096
shr ecx, 12
mov ebx, ecx
.release:
xor eax, eax
xchg eax, [pages_tab+esi*4]
xchg eax, [page_tabs+esi*4]
test eax, 1
jz @F
call free_page
@ -765,7 +765,7 @@ proc user_free stdcall, base:dword
shr esi, 12
shr edi, 12
@@:
mov eax, [pages_tab+esi*4]
mov eax, [page_tabs+esi*4]
test eax, USED_BLOCK
jz .test_free
shr eax, 12
@ -780,7 +780,7 @@ proc user_free stdcall, base:dword
cmp edx, edi
jae .exit
mov ebx, [pages_tab+edx*4]
mov ebx, [page_tabs+edx*4]
test ebx, USED_BLOCK
jz .next_free
@ -791,11 +791,11 @@ proc user_free stdcall, base:dword
.next_free:
test ebx, FREE_BLOCK
jz .err
and dword [pages_tab+edx*4], 0
and dword [page_tabs+edx*4], 0
add eax, ebx
and eax, not 4095
or eax, FREE_BLOCK
mov [pages_tab+esi*4], eax
mov [page_tabs+esi*4], eax
jmp @B
.exit:
xor eax, eax

View File

@ -240,7 +240,7 @@ proc map_page stdcall,lin_addr:dword,phis_addr:dword,flags:dword
or eax, [flags]
mov ebx, [lin_addr]
shr ebx, 12
mov [pages_tab+ebx*4], eax
mov [page_tabs+ebx*4], eax
mov eax, [lin_addr]
invlpg [eax]
pop ebx
@ -296,7 +296,7 @@ commit_pages:
mov ebx, edi
shr ebx, 12
@@:
mov [pages_tab+ebx*4], eax
mov [page_tabs+ebx*4], eax
invlpg [edi]
add edi, edx
add eax, edx
@ -323,7 +323,7 @@ release_pages:
mov edi, eax
shr esi, 10
add esi, pages_tab
add esi, page_tabs
mov ebp, [pg_data.pages_free]
mov ebx, [page_start]
@ -368,7 +368,7 @@ proc map_page_table stdcall, lin_addr:dword, phis_addr:dword
mov dword [current_pgdir+ebx*4], eax
mov eax, [lin_addr]
shr eax, 10
add eax, pages_tab
add eax, page_tabs
invlpg [eax]
pop ebx
ret
@ -439,7 +439,7 @@ proc map_LFB
mov eax, [LFBAddress]
mov esi, eax
shr esi, 10
add esi, pages_tab
add esi, page_tabs
or eax, PG_UW
mov ecx, [pg_count]
shr ecx, 2
@ -488,10 +488,10 @@ proc new_mem_resize stdcall, new_size:dword
shr edi, 12
shr esi, 12
@@:
mov eax, [pages_tab+0x00181000+edi*4]
mov eax, [page_tabs+0x00181000+edi*4]
test eax, 1
jz .next
mov dword [pages_tab+0x00181000+edi*4], 2
mov dword [page_tabs+0x00181000+edi*4], 2
mov ebx, edi
shl ebx, 12
invlpg [ebx+std_application_base_address]
@ -535,7 +535,7 @@ proc new_mem_resize stdcall, new_size:dword
push edi
shr edi, 10
add edi, pages_tab
add edi, page_tabs
mov ecx, 1024
xor eax, eax
cld
@ -614,7 +614,7 @@ update_mem_size:
align 4
get_pg_addr:
shr eax, 12
mov eax, [pages_tab+eax*4]
mov eax, [page_tabs+eax*4]
and eax, 0xFFFFF000
ret
@ -658,7 +658,7 @@ proc page_fault_handler
test edx, 1
jz .fail
mov eax, [pages_tab+ebx*4]
mov eax, [page_tabs+ebx*4]
test eax, 2
jz .fail
.alloc:
@ -696,13 +696,13 @@ proc page_fault_handler
.kernel_space:
; shr ebx, 12
; mov eax, [pages_tab+ebx*4]
; mov eax, [page_tabs+ebx*4]
; shr ebx, 10
; mov eax, [master_tab+ebx*4]
jmp .exit
.old_addr:
; shr ebx, 12
; mov eax, [pages_tab+ebx*4]
; mov eax, [page_tabs+ebx*4]
; shr ebx, 10
; mov eax, [master_tab+ebx*4]
jmp .exit
@ -713,7 +713,7 @@ proc page_fault_handler
jmp .exit
.tab_space:
; shr ebx, 12
; mov eax, [pages_tab+ebx*4]
; mov eax, [page_tabs+ebx*4]
; shr ebx, 10
; ;mov ecx, [sys_page_dir]
; mov eax, [master_tab+ebx*4]
@ -940,21 +940,21 @@ proc sys_ipc_send stdcall, PID:dword, msg_addr:dword, msg_size:dword
mov edx, ebx
shr ebx, 12
xor eax, eax
mov [pages_tab+ebx*4], eax
mov [page_tabs+ebx*4], eax
invlpg [edx]
mov ebx, [ipc_pdir]
mov edx, ebx
shr ebx, 12
xor eax, eax
mov [pages_tab+ebx*4], eax
mov [page_tabs+ebx*4], eax
invlpg [edx]
mov ebx, [ipc_ptab]
mov edx, ebx
shr ebx, 12
xor eax, eax
mov [pages_tab+ebx*4], eax
mov [page_tabs+ebx*4], eax
invlpg [edx]
mov eax, [dst_slot]

View File

@ -421,7 +421,7 @@ proc create_app_space stdcall, app_size:dword,img_base:dword,img_size:dword
mov edi, new_app_base
shr edi, 10
add edi, pages_tab
add edi, page_tabs
mov ecx, [app_tabs]
shl ecx, 10
@ -435,8 +435,8 @@ proc create_app_space stdcall, app_size:dword,img_base:dword,img_size:dword
mov edi, new_app_base
shr esi, 10
shr edi, 10
add esi, pages_tab
add edi, pages_tab
add esi, page_tabs
add edi, page_tabs
.remap:
lodsd
or eax, ebx ; force user level r/w access