AZ hotfix: memory for unpack

pages for V86, access to own page tables

git-svn-id: svn://kolibrios.org@712 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Sergey Semyonov (Serge) 2008-02-07 04:50:50 +00:00
parent 54786d007d
commit 723d4d3618
2 changed files with 14 additions and 6 deletions

View File

@ -47,7 +47,7 @@ v86_create:
; first half (0x800 bytes) is page table for addresses 0 - 0x100000, ; first half (0x800 bytes) is page table for addresses 0 - 0x100000,
; second half is for V86-to-linear translation. ; second half is for V86-to-linear translation.
; Third and fourth are for I/O permission map. ; Third and fourth are for I/O permission map.
push 4000h push 8000h ;page block less 8Kb are discontinuous
call kernel_alloc call kernel_alloc
test eax, eax test eax, eax
jz .fail2 jz .fail2
@ -79,6 +79,12 @@ v86_create:
mov esi, (OS_BASE shr 20) + sys_pgdir mov esi, (OS_BASE shr 20) + sys_pgdir
mov ecx, 0x80000000 shr 22 mov ecx, 0x80000000 shr 22
rep movsd rep movsd
mov eax, [ebx+V86_machine.pagedir] ;root dir also is
call get_pg_addr ;used as page table
or al, PG_SW
mov [edi-4096+(page_tabs shr 20)], eax
pop esi pop esi
; now V86 specific: initialize known addresses in first Mb ; now V86 specific: initialize known addresses in first Mb
pop eax edi pop eax edi
@ -164,7 +170,7 @@ v86_set_page:
; esi=handle ; esi=handle
; out: eax=V86 address, para-aligned (0x10 multiple) ; out: eax=V86 address, para-aligned (0x10 multiple)
; destroys: nothing ; destroys: nothing
; ­Ґ¤®ЇЁб ­ !!! ; !!!
;v86_alloc: ;v86_alloc:
; push ebx ecx edx edi ; push ebx ecx edx edi
; lea ebx, [esi+V86_machine.mutex] ; lea ebx, [esi+V86_machine.mutex]
@ -384,8 +390,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)
; …б«Ё Ўл ¬л ¬®Ј«Ё бе«®Ї®в вм ЁбЄ«о祭ЁҐ в®«мЄ® Ё§-§  з⥭Ёп Ў ©в®ў Є®¤ , ; ᪫祭 ⮫쪮 - ,
; ¬л Ўл ҐЈ® 㦥 бе«®Ї®в «Ё Ё нв® Ўл«® Ўл ­Ґ #GP ; 嫮⠫ #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

@ -511,7 +511,9 @@ high_code:
add eax, ebx add eax, ebx
mov [ipc_ptab], eax mov [ipc_ptab], eax
stdcall kernel_alloc, unpack.LZMA_BASE_SIZE+(unpack.LZMA_LIT_SIZE shl (unpack.lc+unpack.lp)) stdcall kernel_alloc, (unpack.LZMA_BASE_SIZE+(unpack.LZMA_LIT_SIZE shl \
(unpack.lc+unpack.lp)))*4
mov [unpack.p], eax mov [unpack.p], eax
call init_events call init_events