sys function 68 is without shift registers call

git-svn-id: svn://kolibrios.org@1345 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Alexey Teplov ( 2010-01-02 05:49:10 +00:00
parent 22dfbb516f
commit 58d22770cb
4 changed files with 81 additions and 69 deletions

View File

@ -333,24 +333,24 @@ proc srv_handler stdcall, ioctl:dword
endp
; param
; ebx= io_control
; ecx= io_control
;
; retval
; eax= error code
align 4
srv_handlerEx:
cmp ebx, OS_BASE
cmp ecx, OS_BASE
jae .fail
mov eax, [ebx+handle]
mov eax, [ecx+handle]
cmp [eax+SRV.magic], ' SRV'
jne .fail
cmp [eax+SRV.size], SRV.sizeof
jne .fail
stdcall [eax+SRV.srv_proc], ebx
stdcall [eax+SRV.srv_proc], ecx
ret
.fail:
or eax, -1

View File

@ -1133,67 +1133,68 @@ f68call:
endg
align 4
f68:
cmp eax,4
cmp ebx,4
jle sys_sheduler
cmp eax, 11
cmp ebx, 11
jb .fail
cmp eax, 25
cmp ebx, 25
ja .fail
jmp dword [f68call+eax*4-11*4]
jmp dword [f68call+ebx*4-11*4]
.11:
call init_heap
mov [esp+36], eax
mov [esp+32], eax
ret
.12:
stdcall user_alloc, ebx
mov [esp+36], eax
stdcall user_alloc, ecx
mov [esp+32], eax
ret
.13:
stdcall user_free, ebx
mov [esp+36], eax
stdcall user_free, ecx
mov [esp+32], eax
ret
.14:
cmp ebx, OS_BASE
cmp ecx, OS_BASE
jae .fail
mov edi,ebx
mov edi,ecx
call get_event_ex
mov [esp+36], eax
mov [esp+32], eax
ret
.16:
test ebx, ebx
test ecx, ecx
jz .fail
cmp ebx, OS_BASE
cmp ecx, OS_BASE
jae .fail
stdcall get_service, ebx
mov [esp+36], eax
stdcall get_service, ecx
mov [esp+32], eax
ret
.17:
call srv_handlerEx ;ebx
mov [esp+36], eax
call srv_handlerEx ;ecx
mov [esp+32], eax
ret
.19:
cmp ebx, OS_BASE
cmp ecx, OS_BASE
jae .fail
stdcall load_library, ebx
mov [esp+36], eax
stdcall load_library, ecx
mov [esp+32], eax
ret
.20:
mov eax, ecx
call user_realloc
mov [esp+36], eax
mov eax, edx
mov ebx, ecx
call user_realloc ;in: eax = pointer, ebx = new size
mov [esp+32], eax
ret
.21:
cmp ebx, OS_BASE
jae .fail
cmp ecx, OS_BASE
jae .fail
mov edi, ecx
stdcall load_PE, ebx
cmp ebx, OS_BASE
jae .fail
mov edi, edx
stdcall load_PE, ecx
mov esi, eax
test eax, eax
jz @F
@ -1208,45 +1209,45 @@ f68:
mov [eax+SRV.entry], esi
@@:
mov [esp+36], eax
mov [esp+32], eax
ret
.22:
cmp ebx, OS_BASE
cmp ecx, OS_BASE
jae .fail
stdcall shmem_open, ebx, ecx, edx
mov [esp+28], edx
mov [esp+36], eax
stdcall shmem_open, ecx, edx, esi
mov [esp+24], edx
mov [esp+32], eax
ret
.23:
cmp ebx, OS_BASE
cmp ecx, OS_BASE
jae .fail
stdcall shmem_close, ebx
mov [esp+36], eax
stdcall shmem_close, ecx
mov [esp+32], eax
ret
.24:
mov eax, [current_slot]
xchg ebx, [eax+APPDATA.exc_handler]
xchg ecx, [eax+APPDATA.except_mask]
mov [esp+36], ebx ; reg_eax+8
mov [esp+24], ecx ; reg_ebx+8
xchg ecx, [eax+APPDATA.exc_handler]
xchg edx, [eax+APPDATA.except_mask]
mov [esp+32], ecx ; reg_eax+8
mov [esp+20], edx ; reg_ebx+8
ret
.25:
cmp ebx,32
cmp ecx,32
jae .fail
mov eax, [current_slot]
btr [eax+APPDATA.except_mask],ebx
setc byte[esp+36]
btr [eax+APPDATA.except_mask],ecx
setc byte[esp+32]
jecxz @f
bts [eax+APPDATA.except_mask],ebx
bts [eax+APPDATA.except_mask],ecx
@@:
ret
.fail:
xor eax, eax
mov [esp+36], eax
mov [esp+32], eax
ret
align 4

View File

@ -20,7 +20,6 @@ cross_order:
call dword [servetable+edi*4]
ret
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; ;;
;; SYSENTER ENTRY ;;
@ -171,7 +170,7 @@ iglobal
dd syscall_putimage_palette; 65-PutImagePalette
dd sys_process_def ; 66-Process definitions - keyboard
dd sys_window_move ; 67-Window move or resize
dd f68 ; 68-Some internal services
dd 0 ; 68-Some internal services
dd 0 ; 69-Debug
dd file_system_lfn ; 70-Common file system interface, version 2
; dd 0 ; 71-Window settings
@ -250,7 +249,7 @@ iglobal
dd cross_order ; 65-PutImagePalette
dd cross_order ; 66-Process definitions - keyboard
dd cross_order ; 67-Window move or resize
dd cross_order ; 68-Some internal services
dd f68 ; 68-Some internal services
dd sys_debug_services ; 69-Debug
dd cross_order ; 70-Common file system interface, version 2
dd syscall_windowsettings ; 71-Window settings

View File

@ -3408,31 +3408,43 @@ sheduler:
endg
sys_sheduler:
;rewritten by <Lrz> 29.12.2009
jmp dword [sheduler+eax*4]
; jmp dword [sheduler+eax*4]
jmp dword [sheduler+ebx*4]
;.shed_counter:
.00:
mov eax,[context_counter]
mov [esp+36],eax
mov [esp+32],eax
ret
.02:
;.perf_control:
test ebx,ebx
; test ebx,ebx
; jz modify_pce ;if ecx=0
; dec ebx
; jz is_cache_enabled ;if ecx=1
; dec ebx
; jz cache_enable ;if ecx=2
; ret
;;;;;;;;
test ecx,ecx
jz modify_pce ;if ecx=0
dec ebx
dec ecx
jz is_cache_enabled ;if ecx=1
dec ebx
dec ecx
jz cache_enable ;if ecx=2
ret
.03:
;.rdmsr_instr:
;now counter in ecx
;(edx:eax) esi:edi => edx:esi
mov eax,esi
; mov ecx,edx
mov ecx,edx
rdmsr
mov [esp+36],eax
mov [esp+24],edx ;ret in ebx?
mov [esp+32],eax
mov [esp+20],edx ;ret in ebx?
ret
.04:
@ -3442,17 +3454,17 @@ sys_sheduler:
; Fast Call MSR can't be destroy
; <20>® MSR_AMD_EFER ¬®¦­® ¨§¬¥­ïâì, â.ª. ¢ í⮬ ॣ¨áâॠ«¨è
; ¢ª«îç îâáï/¢ëª«îç îâáï à áè¨à¥­­ë¥ ¢®§¬®¦­®áâ¨
cmp ecx,MSR_SYSENTER_CS
cmp edx,MSR_SYSENTER_CS
je @f
cmp ecx,MSR_SYSENTER_ESP
cmp edx,MSR_SYSENTER_ESP
je @f
cmp ecx,MSR_SYSENTER_EIP
cmp edx,MSR_SYSENTER_EIP
je @f
cmp ecx,MSR_AMD_STAR
cmp edx,MSR_AMD_STAR
je @f
mov eax,esi
; mov ecx,edx
mov ecx,edx
wrmsr
; mov [esp + 32], eax
; mov [esp + 20], edx ;ret in ebx?
@ -3477,9 +3489,9 @@ is_cache_enabled:
mov ebx,eax
and eax,01100000000000000000000000000000b
jz cache_disabled
mov [esp+36],ebx
mov [esp+32],ebx
cache_disabled:
mov dword [esp+36],eax ;0
mov dword [esp+32],eax ;0
ret
modify_pce:
@ -3489,7 +3501,7 @@ modify_pce:
; xor eax,ebx ;invert pce
bts eax,8 ;pce=cr4[8]
mov cr4,eax
mov [esp+36],eax
mov [esp+32],eax
ret
;---------------------------------------------------------------------------------------------