forked from KolibriOS/kolibrios
optimization of fix in rev.1089 for my bug, delivered in rev.1074
git-svn-id: svn://kolibrios.org@1105 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
d03ef619fc
commit
3745ae0ad7
@ -547,14 +547,15 @@ get_pg_addr:
|
|||||||
|
|
||||||
|
|
||||||
align 4
|
align 4
|
||||||
; Now it is called from sys32::exc_c (see stack frame there)
|
; Now it is called from core/sys32::exc_c (see stack frame there)
|
||||||
proc page_fault_handler
|
proc page_fault_handler
|
||||||
|
|
||||||
.err_addr equ ebp-4
|
.err_addr equ ebp-4
|
||||||
|
|
||||||
|
push ebx ;save exception number (#PF)
|
||||||
mov ebp, esp
|
mov ebp, esp
|
||||||
mov ebx, cr2
|
mov ebx, cr2
|
||||||
push ebx ; that is locals: .err_addr = cr2
|
push ebx ;that is locals: .err_addr = cr2
|
||||||
inc [pg_data.pages_faults]
|
inc [pg_data.pages_faults]
|
||||||
|
|
||||||
; push eax
|
; push eax
|
||||||
@ -588,8 +589,7 @@ end if
|
|||||||
.core_tabs:
|
.core_tabs:
|
||||||
.fail: ;simply return to caller
|
.fail: ;simply return to caller
|
||||||
mov esp, ebp
|
mov esp, ebp
|
||||||
push 14 ;#PF
|
pop ebx ;restore exception number (#PF)
|
||||||
pop ebx
|
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.user_space:
|
.user_space:
|
||||||
@ -623,7 +623,7 @@ end if
|
|||||||
;cld ;caller is duty for this
|
;cld ;caller is duty for this
|
||||||
rep stosd
|
rep stosd
|
||||||
.exit: ;iret with repeat fault instruction
|
.exit: ;iret with repeat fault instruction
|
||||||
add esp,8 ; clear in stack: locals(.err_addr) + ret_to_caller
|
add esp,12 ;clear in stack: locals(.err_addr) + #PF + ret_to_caller
|
||||||
restore_ring3_context
|
restore_ring3_context
|
||||||
iretd
|
iretd
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user