mirror of
https://github.com/KolibriOS/kolibrios.git
synced 2024-12-17 12:22:35 +03:00
rename pages_tab -> page_tabs
git-svn-id: svn://kolibrios.org@365 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
b000e7656d
commit
c3f06c82fb
@ -230,7 +230,7 @@ draw_data equ 0x988000
|
|||||||
|
|
||||||
HEAP_BASE equ 0x98B000
|
HEAP_BASE equ 0x98B000
|
||||||
|
|
||||||
pages_tab equ 0x60000000
|
page_tabs equ 0x60000000
|
||||||
master_tab equ 0x60180000
|
master_tab equ 0x60180000
|
||||||
current_pgdir equ 0x60180000
|
current_pgdir equ 0x60180000
|
||||||
|
|
||||||
|
@ -640,7 +640,7 @@ proc init_heap
|
|||||||
mov ecx, eax
|
mov ecx, eax
|
||||||
sub eax, 4096
|
sub eax, 4096
|
||||||
or ecx, FREE_BLOCK
|
or ecx, FREE_BLOCK
|
||||||
mov [pages_tab+esi], ecx
|
mov [page_tabs+esi], ecx
|
||||||
ret
|
ret
|
||||||
.exit:
|
.exit:
|
||||||
xor eax, eax
|
xor eax, eax
|
||||||
@ -666,7 +666,7 @@ l_0:
|
|||||||
|
|
||||||
mov ebx, esi
|
mov ebx, esi
|
||||||
shr ebx, 12
|
shr ebx, 12
|
||||||
mov eax, [pages_tab+ebx*4]
|
mov eax, [page_tabs+ebx*4]
|
||||||
test eax, FREE_BLOCK
|
test eax, FREE_BLOCK
|
||||||
jz test_used
|
jz test_used
|
||||||
and eax, 0xFFFFF000
|
and eax, 0xFFFFF000
|
||||||
@ -679,16 +679,16 @@ l_0:
|
|||||||
sub eax, ecx;
|
sub eax, ecx;
|
||||||
or eax, FREE_BLOCK
|
or eax, FREE_BLOCK
|
||||||
shr edx, 12
|
shr edx, 12
|
||||||
mov [pages_tab+edx*4], eax
|
mov [page_tabs+edx*4], eax
|
||||||
|
|
||||||
@@:
|
@@:
|
||||||
or ecx, USED_BLOCK
|
or ecx, USED_BLOCK
|
||||||
mov [pages_tab+ebx*4], ecx
|
mov [page_tabs+ebx*4], ecx
|
||||||
shr ecx, 12
|
shr ecx, 12
|
||||||
dec ecx
|
dec ecx
|
||||||
inc ebx
|
inc ebx
|
||||||
@@:
|
@@:
|
||||||
mov dword [pages_tab+ebx*4], 2
|
mov dword [page_tabs+ebx*4], 2
|
||||||
inc ebx
|
inc ebx
|
||||||
dec ecx
|
dec ecx
|
||||||
jnz @B
|
jnz @B
|
||||||
@ -730,21 +730,21 @@ proc user_free stdcall, base:dword
|
|||||||
xor ebx, ebx
|
xor ebx, ebx
|
||||||
sub esi, 4096
|
sub esi, 4096
|
||||||
shr esi, 12
|
shr esi, 12
|
||||||
mov eax, [pages_tab+esi*4]
|
mov eax, [page_tabs+esi*4]
|
||||||
test eax, USED_BLOCK
|
test eax, USED_BLOCK
|
||||||
jz .not_used
|
jz .not_used
|
||||||
|
|
||||||
and eax, not 4095
|
and eax, not 4095
|
||||||
mov ecx, eax
|
mov ecx, eax
|
||||||
or eax, FREE_BLOCK
|
or eax, FREE_BLOCK
|
||||||
mov [pages_tab+esi*4], eax
|
mov [page_tabs+esi*4], eax
|
||||||
inc esi
|
inc esi
|
||||||
sub ecx, 4096
|
sub ecx, 4096
|
||||||
shr ecx, 12
|
shr ecx, 12
|
||||||
mov ebx, ecx
|
mov ebx, ecx
|
||||||
.release:
|
.release:
|
||||||
xor eax, eax
|
xor eax, eax
|
||||||
xchg eax, [pages_tab+esi*4]
|
xchg eax, [page_tabs+esi*4]
|
||||||
test eax, 1
|
test eax, 1
|
||||||
jz @F
|
jz @F
|
||||||
call free_page
|
call free_page
|
||||||
@ -765,7 +765,7 @@ proc user_free stdcall, base:dword
|
|||||||
shr esi, 12
|
shr esi, 12
|
||||||
shr edi, 12
|
shr edi, 12
|
||||||
@@:
|
@@:
|
||||||
mov eax, [pages_tab+esi*4]
|
mov eax, [page_tabs+esi*4]
|
||||||
test eax, USED_BLOCK
|
test eax, USED_BLOCK
|
||||||
jz .test_free
|
jz .test_free
|
||||||
shr eax, 12
|
shr eax, 12
|
||||||
@ -780,7 +780,7 @@ proc user_free stdcall, base:dword
|
|||||||
cmp edx, edi
|
cmp edx, edi
|
||||||
jae .exit
|
jae .exit
|
||||||
|
|
||||||
mov ebx, [pages_tab+edx*4]
|
mov ebx, [page_tabs+edx*4]
|
||||||
test ebx, USED_BLOCK
|
test ebx, USED_BLOCK
|
||||||
jz .next_free
|
jz .next_free
|
||||||
|
|
||||||
@ -791,11 +791,11 @@ proc user_free stdcall, base:dword
|
|||||||
.next_free:
|
.next_free:
|
||||||
test ebx, FREE_BLOCK
|
test ebx, FREE_BLOCK
|
||||||
jz .err
|
jz .err
|
||||||
and dword [pages_tab+edx*4], 0
|
and dword [page_tabs+edx*4], 0
|
||||||
add eax, ebx
|
add eax, ebx
|
||||||
and eax, not 4095
|
and eax, not 4095
|
||||||
or eax, FREE_BLOCK
|
or eax, FREE_BLOCK
|
||||||
mov [pages_tab+esi*4], eax
|
mov [page_tabs+esi*4], eax
|
||||||
jmp @B
|
jmp @B
|
||||||
.exit:
|
.exit:
|
||||||
xor eax, eax
|
xor eax, eax
|
||||||
|
@ -240,7 +240,7 @@ proc map_page stdcall,lin_addr:dword,phis_addr:dword,flags:dword
|
|||||||
or eax, [flags]
|
or eax, [flags]
|
||||||
mov ebx, [lin_addr]
|
mov ebx, [lin_addr]
|
||||||
shr ebx, 12
|
shr ebx, 12
|
||||||
mov [pages_tab+ebx*4], eax
|
mov [page_tabs+ebx*4], eax
|
||||||
mov eax, [lin_addr]
|
mov eax, [lin_addr]
|
||||||
invlpg [eax]
|
invlpg [eax]
|
||||||
pop ebx
|
pop ebx
|
||||||
@ -296,7 +296,7 @@ commit_pages:
|
|||||||
mov ebx, edi
|
mov ebx, edi
|
||||||
shr ebx, 12
|
shr ebx, 12
|
||||||
@@:
|
@@:
|
||||||
mov [pages_tab+ebx*4], eax
|
mov [page_tabs+ebx*4], eax
|
||||||
invlpg [edi]
|
invlpg [edi]
|
||||||
add edi, edx
|
add edi, edx
|
||||||
add eax, edx
|
add eax, edx
|
||||||
@ -323,7 +323,7 @@ release_pages:
|
|||||||
mov edi, eax
|
mov edi, eax
|
||||||
|
|
||||||
shr esi, 10
|
shr esi, 10
|
||||||
add esi, pages_tab
|
add esi, page_tabs
|
||||||
|
|
||||||
mov ebp, [pg_data.pages_free]
|
mov ebp, [pg_data.pages_free]
|
||||||
mov ebx, [page_start]
|
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 dword [current_pgdir+ebx*4], eax
|
||||||
mov eax, [lin_addr]
|
mov eax, [lin_addr]
|
||||||
shr eax, 10
|
shr eax, 10
|
||||||
add eax, pages_tab
|
add eax, page_tabs
|
||||||
invlpg [eax]
|
invlpg [eax]
|
||||||
pop ebx
|
pop ebx
|
||||||
ret
|
ret
|
||||||
@ -439,7 +439,7 @@ proc map_LFB
|
|||||||
mov eax, [LFBAddress]
|
mov eax, [LFBAddress]
|
||||||
mov esi, eax
|
mov esi, eax
|
||||||
shr esi, 10
|
shr esi, 10
|
||||||
add esi, pages_tab
|
add esi, page_tabs
|
||||||
or eax, PG_UW
|
or eax, PG_UW
|
||||||
mov ecx, [pg_count]
|
mov ecx, [pg_count]
|
||||||
shr ecx, 2
|
shr ecx, 2
|
||||||
@ -488,10 +488,10 @@ proc new_mem_resize stdcall, new_size:dword
|
|||||||
shr edi, 12
|
shr edi, 12
|
||||||
shr esi, 12
|
shr esi, 12
|
||||||
@@:
|
@@:
|
||||||
mov eax, [pages_tab+0x00181000+edi*4]
|
mov eax, [page_tabs+0x00181000+edi*4]
|
||||||
test eax, 1
|
test eax, 1
|
||||||
jz .next
|
jz .next
|
||||||
mov dword [pages_tab+0x00181000+edi*4], 2
|
mov dword [page_tabs+0x00181000+edi*4], 2
|
||||||
mov ebx, edi
|
mov ebx, edi
|
||||||
shl ebx, 12
|
shl ebx, 12
|
||||||
invlpg [ebx+std_application_base_address]
|
invlpg [ebx+std_application_base_address]
|
||||||
@ -535,7 +535,7 @@ proc new_mem_resize stdcall, new_size:dword
|
|||||||
|
|
||||||
push edi
|
push edi
|
||||||
shr edi, 10
|
shr edi, 10
|
||||||
add edi, pages_tab
|
add edi, page_tabs
|
||||||
mov ecx, 1024
|
mov ecx, 1024
|
||||||
xor eax, eax
|
xor eax, eax
|
||||||
cld
|
cld
|
||||||
@ -614,7 +614,7 @@ update_mem_size:
|
|||||||
align 4
|
align 4
|
||||||
get_pg_addr:
|
get_pg_addr:
|
||||||
shr eax, 12
|
shr eax, 12
|
||||||
mov eax, [pages_tab+eax*4]
|
mov eax, [page_tabs+eax*4]
|
||||||
and eax, 0xFFFFF000
|
and eax, 0xFFFFF000
|
||||||
ret
|
ret
|
||||||
|
|
||||||
@ -658,7 +658,7 @@ proc page_fault_handler
|
|||||||
test edx, 1
|
test edx, 1
|
||||||
jz .fail
|
jz .fail
|
||||||
|
|
||||||
mov eax, [pages_tab+ebx*4]
|
mov eax, [page_tabs+ebx*4]
|
||||||
test eax, 2
|
test eax, 2
|
||||||
jz .fail
|
jz .fail
|
||||||
.alloc:
|
.alloc:
|
||||||
@ -696,13 +696,13 @@ proc page_fault_handler
|
|||||||
|
|
||||||
.kernel_space:
|
.kernel_space:
|
||||||
; shr ebx, 12
|
; shr ebx, 12
|
||||||
; mov eax, [pages_tab+ebx*4]
|
; mov eax, [page_tabs+ebx*4]
|
||||||
; shr ebx, 10
|
; shr ebx, 10
|
||||||
; mov eax, [master_tab+ebx*4]
|
; mov eax, [master_tab+ebx*4]
|
||||||
jmp .exit
|
jmp .exit
|
||||||
.old_addr:
|
.old_addr:
|
||||||
; shr ebx, 12
|
; shr ebx, 12
|
||||||
; mov eax, [pages_tab+ebx*4]
|
; mov eax, [page_tabs+ebx*4]
|
||||||
; shr ebx, 10
|
; shr ebx, 10
|
||||||
; mov eax, [master_tab+ebx*4]
|
; mov eax, [master_tab+ebx*4]
|
||||||
jmp .exit
|
jmp .exit
|
||||||
@ -713,7 +713,7 @@ proc page_fault_handler
|
|||||||
jmp .exit
|
jmp .exit
|
||||||
.tab_space:
|
.tab_space:
|
||||||
; shr ebx, 12
|
; shr ebx, 12
|
||||||
; mov eax, [pages_tab+ebx*4]
|
; mov eax, [page_tabs+ebx*4]
|
||||||
; shr ebx, 10
|
; shr ebx, 10
|
||||||
; ;mov ecx, [sys_page_dir]
|
; ;mov ecx, [sys_page_dir]
|
||||||
; mov eax, [master_tab+ebx*4]
|
; 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
|
mov edx, ebx
|
||||||
shr ebx, 12
|
shr ebx, 12
|
||||||
xor eax, eax
|
xor eax, eax
|
||||||
mov [pages_tab+ebx*4], eax
|
mov [page_tabs+ebx*4], eax
|
||||||
invlpg [edx]
|
invlpg [edx]
|
||||||
|
|
||||||
mov ebx, [ipc_pdir]
|
mov ebx, [ipc_pdir]
|
||||||
mov edx, ebx
|
mov edx, ebx
|
||||||
shr ebx, 12
|
shr ebx, 12
|
||||||
xor eax, eax
|
xor eax, eax
|
||||||
mov [pages_tab+ebx*4], eax
|
mov [page_tabs+ebx*4], eax
|
||||||
invlpg [edx]
|
invlpg [edx]
|
||||||
|
|
||||||
mov ebx, [ipc_ptab]
|
mov ebx, [ipc_ptab]
|
||||||
mov edx, ebx
|
mov edx, ebx
|
||||||
shr ebx, 12
|
shr ebx, 12
|
||||||
xor eax, eax
|
xor eax, eax
|
||||||
mov [pages_tab+ebx*4], eax
|
mov [page_tabs+ebx*4], eax
|
||||||
invlpg [edx]
|
invlpg [edx]
|
||||||
|
|
||||||
mov eax, [dst_slot]
|
mov eax, [dst_slot]
|
||||||
|
@ -421,7 +421,7 @@ proc create_app_space stdcall, app_size:dword,img_base:dword,img_size:dword
|
|||||||
|
|
||||||
mov edi, new_app_base
|
mov edi, new_app_base
|
||||||
shr edi, 10
|
shr edi, 10
|
||||||
add edi, pages_tab
|
add edi, page_tabs
|
||||||
|
|
||||||
mov ecx, [app_tabs]
|
mov ecx, [app_tabs]
|
||||||
shl ecx, 10
|
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
|
mov edi, new_app_base
|
||||||
shr esi, 10
|
shr esi, 10
|
||||||
shr edi, 10
|
shr edi, 10
|
||||||
add esi, pages_tab
|
add esi, page_tabs
|
||||||
add edi, pages_tab
|
add edi, page_tabs
|
||||||
.remap:
|
.remap:
|
||||||
lodsd
|
lodsd
|
||||||
or eax, ebx ; force user level r/w access
|
or eax, ebx ; force user level r/w access
|
||||||
|
Loading…
Reference in New Issue
Block a user