translate russian comments to english #3, no code changes

git-svn-id: svn://kolibrios.org@8052 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Rustem Gimadutdinov (rgimad) 2020-07-16 13:51:29 +00:00
parent 5b284466d4
commit f8b90e92fa
4 changed files with 32 additions and 32 deletions

View File

@ -14,10 +14,10 @@ proc alloc_page
pushfd pushfd
cli cli
push ebx push ebx
;//-
cmp [pg_data.pages_free], 1 cmp [pg_data.pages_free], 1
jle .out_of_memory jle .out_of_memory
;//-
mov ebx, [page_start] mov ebx, [page_start]
mov ecx, [page_end] mov ecx, [page_end]
@ -32,27 +32,27 @@ proc alloc_page
xor eax, eax xor eax, eax
ret ret
.found: .found:
;//-
dec [pg_data.pages_free] dec [pg_data.pages_free]
jz .out_of_memory jz .out_of_memory
;//-
btr [ebx], eax btr [ebx], eax
mov [page_start], ebx mov [page_start], ebx
sub ebx, sys_pgmap sub ebx, sys_pgmap
lea eax, [eax+ebx*8] lea eax, [eax+ebx*8]
shl eax, 12 shl eax, 12
;//- dec [pg_data.pages_free] ; dec [pg_data.pages_free]
pop ebx pop ebx
popfd popfd
ret ret
;//-
.out_of_memory: .out_of_memory:
mov [pg_data.pages_free], 1 mov [pg_data.pages_free], 1
xor eax, eax xor eax, eax
pop ebx pop ebx
popfd popfd
ret ret
;//-
endp endp
align 4 align 4
@ -65,14 +65,14 @@ proc alloc_pages stdcall, count:dword
add eax, 7 add eax, 7
shr eax, 3 shr eax, 3
mov [count], eax mov [count], eax
;//-
mov ebx, [pg_data.pages_free] mov ebx, [pg_data.pages_free]
sub ebx, 9 sub ebx, 9
js .out_of_memory js .out_of_memory
shr ebx, 3 shr ebx, 3
cmp eax, ebx cmp eax, ebx
jg .out_of_memory jg .out_of_memory
;//-
mov ecx, [page_start] mov ecx, [page_start]
mov ebx, [page_end] mov ebx, [page_end]
.find: .find:
@ -538,7 +538,7 @@ endp
; eax= linear address ; eax= linear address
; ;
; retval ; retval
; eax= phisical page address ; eax= physical page address
align 4 align 4
get_pg_addr: get_pg_addr:
@ -567,14 +567,14 @@ proc page_fault_handler
mov eax, [pf_err_code] mov eax, [pf_err_code]
cmp ebx, OS_BASE ;ebx == .err_addr cmp ebx, OS_BASE ;ebx == .err_addr
jb .user_space ;страница в памяти приложения ; jb .user_space ;page in application memory
cmp ebx, page_tabs cmp ebx, page_tabs
jb .kernel_space ;страница в памяти ядра jb .kernel_space ;page in kernel memory
cmp ebx, kernel_tabs cmp ebx, kernel_tabs
jb .alloc;.app_tabs ;таблицы страниц приложения ; jb .alloc;.app_tabs ;page tables of application ;
;просто создадим одну ;simply create one
.core_tabs: .core_tabs:
.fail: ;simply return to caller .fail: ;simply return to caller
mov esp, ebp mov esp, ebp
@ -583,21 +583,21 @@ proc page_fault_handler
.user_space: .user_space:
test eax, PG_READ test eax, PG_READ
jnz .err_access ;Страница присутствует jnz .err_access ;Page presents
;Ошибка доступа ? ;Access error ?
shr ebx, 12 shr ebx, 12
mov ecx, ebx mov ecx, ebx
shr ecx, 10 shr ecx, 10
mov edx, [master_tab+ecx*4] mov edx, [master_tab+ecx*4]
test edx, PG_READ test edx, PG_READ
jz .fail ;таблица страниц не создана jz .fail ;page table is not created
;неверный адрес в программе ;incorrect address in program
mov eax, [page_tabs+ebx*4] mov eax, [page_tabs+ebx*4]
test eax, 2 test eax, 2
jz .fail ;адрес не зарезервирован для ; jz .fail ;address is not reserved for usage. Error
;использования. Ошибка
.alloc: .alloc:
call alloc_page call alloc_page
test eax, eax test eax, eax
@ -652,16 +652,16 @@ proc page_fault_handler
.kernel_space: .kernel_space:
test eax, PG_READ test eax, PG_READ
jz .fail ;страница не присутствует jz .fail ;page does not present
test eax, 12 ;U/S (+below) test eax, 12 ;U/S (+below)
jnz .fail ;приложение обратилось к памяти jnz .fail ;application requested kernel memory
;ядра
;test eax, 8 ;test eax, 8
;jnz .fail ;установлен зарезервированный бит ;jnz .fail ;the reserved bit is set in page tables. Added in P4/Xeon
;в таблицах страниц. добавлено в P4/Xeon
;попытка записи в защищённую страницу ядра ;an attempt to write to a protected kernel page
cmp ebx, tss._io_map_0 cmp ebx, tss._io_map_0
jb .fail jb .fail

View File

@ -15,7 +15,7 @@ $Revision$
align 32 align 32
sysenter_entry: sysenter_entry:
; Настраиваем стек ; Setting up the stack
mov esp, [ss:tss._esp0] mov esp, [ss:tss._esp0]
sti sti
push ebp ; save app esp + 4 push ebp ; save app esp + 4
@ -33,7 +33,7 @@ sysenter_entry:
call unprotect_from_terminate call unprotect_from_terminate
popad popad
;------------------ ;------------------
xchg ecx, [ss:esp] ; в вершин стека - app ecx, ecx - app esp + 4 xchg ecx, [ss:esp] ; in the stack top - app ecx, ecx - app esp + 4
sub ecx, 4 sub ecx, 4
xchg edx, [ecx] ; edx - return point, & save original edx xchg edx, [ecx] ; edx - return point, & save original edx
push edx push edx

View File

@ -358,8 +358,8 @@ v86_exc_c:
jnz .nogp jnz .nogp
; Otherwise we can safely access byte at CS:IP ; Otherwise we can safely access byte at CS:IP
; (because it is #GP, not #PF handler) ; (because it is #GP, not #PF handler)
; Если бы мы могли схлопотать исключение только из-за чтения байтов кода, ; If we could get an exception just because of reading code bytes,
; мы бы его уже схлопотали и это было бы не #GP ; we would have got it already and it wouldn't be #GP
movzx esi, word [esp+v86_regs.cs] movzx esi, word [esp+v86_regs.cs]
shl esi, 4 shl esi, 4
add esi, [esp+v86_regs.eip] add esi, [esp+v86_regs.eip]

View File

@ -307,7 +307,7 @@ init_BIOS32:
test al, al test al, al
jnz .PCI_BIOS32_not_found jnz .PCI_BIOS32_not_found
; здесь создаются дискрипторы для PCI BIOS ; descriptors for PCI BIOS are created here
add ebx, OS_BASE add ebx, OS_BASE
dec ecx dec ecx
@ -331,7 +331,7 @@ init_BIOS32:
mov [(pci_bios_entry-OS_BASE)], edx mov [(pci_bios_entry-OS_BASE)], edx
; jmp .end ; jmp .end
.PCI_BIOS32_not_found: .PCI_BIOS32_not_found:
; здесь должна заполнятся pci_emu_dat ; pci_emu_dat structure should be filled here
.BIOS32_not_found: .BIOS32_not_found:
.end: .end:
ret ret