small update 46 system function(no tested!)
git-svn-id: svn://kolibrios.org@9742 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
6c66c1519e
commit
8708293b8f
@ -693,6 +693,13 @@ destroy_thread:
|
|||||||
jmp rmpr9
|
jmp rmpr9
|
||||||
|
|
||||||
rmpr4:
|
rmpr4:
|
||||||
|
push eax edx ebp ;TODO: check using register ebp in next code
|
||||||
|
mov eax, [edi + 4]
|
||||||
|
mov edx, [edi + 8]
|
||||||
|
xor ebp, ebp
|
||||||
|
inc ebp
|
||||||
|
call new_port_access_disable
|
||||||
|
pop ebp edx eax
|
||||||
|
|
||||||
mov ecx, 256
|
mov ecx, 256
|
||||||
sub ecx, esi
|
sub ecx, esi
|
||||||
|
@ -3480,6 +3480,11 @@ align 4
|
|||||||
ret
|
ret
|
||||||
;-----------------------------------------------------------------------------
|
;-----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
; in: eax = port
|
||||||
|
; ebp = subfunction
|
||||||
|
; 0 - set access
|
||||||
|
; 1 - clear access
|
||||||
|
; out: not return value
|
||||||
align 4
|
align 4
|
||||||
set_io_access_rights:
|
set_io_access_rights:
|
||||||
push edi eax
|
push edi eax
|
||||||
@ -3490,8 +3495,7 @@ set_io_access_rights:
|
|||||||
; add edi,eax
|
; add edi,eax
|
||||||
; mov ebx,1
|
; mov ebx,1
|
||||||
; shl ebx,cl
|
; shl ebx,cl
|
||||||
test ebp, ebp
|
test ebp, ebp ; enable access - ebp = 0
|
||||||
; cmp ebp,0 ; enable access - ebp = 0
|
|
||||||
jnz .siar1
|
jnz .siar1
|
||||||
; not ebx
|
; not ebx
|
||||||
; and [edi],byte bl
|
; and [edi],byte bl
|
||||||
@ -3499,8 +3503,7 @@ set_io_access_rights:
|
|||||||
pop eax edi
|
pop eax edi
|
||||||
ret
|
ret
|
||||||
.siar1:
|
.siar1:
|
||||||
bts [edi], eax
|
bts [edi], eax ; disable access - ebp = 1
|
||||||
; or [edi],byte bl ; disable access - ebp = 1
|
|
||||||
pop eax edi
|
pop eax edi
|
||||||
ret
|
ret
|
||||||
|
|
||||||
@ -3526,12 +3529,6 @@ r_f_port_area:
|
|||||||
|
|
||||||
test ebx, ebx
|
test ebx, ebx
|
||||||
jnz free_port_area
|
jnz free_port_area
|
||||||
; je r_port_area
|
|
||||||
; jmp free_port_area
|
|
||||||
|
|
||||||
; r_port_area:
|
|
||||||
|
|
||||||
; pushad
|
|
||||||
|
|
||||||
cmp ecx, edx ; beginning > end ?
|
cmp ecx, edx ; beginning > end ?
|
||||||
ja rpal1
|
ja rpal1
|
||||||
@ -3550,43 +3547,32 @@ r_f_port_area:
|
|||||||
ja rpal4
|
ja rpal4
|
||||||
cmp edx, [ebx+4]
|
cmp edx, [ebx+4]
|
||||||
jae rpal1
|
jae rpal1
|
||||||
; jb rpal4
|
|
||||||
; jmp rpal1
|
|
||||||
rpal4:
|
rpal4:
|
||||||
dec eax
|
dec eax
|
||||||
jnz rpal3
|
jnz rpal3
|
||||||
jmp rpal2
|
jmp rpal2
|
||||||
rpal1:
|
rpal1:
|
||||||
; popad
|
|
||||||
; mov eax,1
|
|
||||||
xor eax, eax
|
xor eax, eax
|
||||||
inc eax
|
inc eax
|
||||||
ret
|
ret
|
||||||
rpal2:
|
rpal2:
|
||||||
; popad
|
|
||||||
; enable port access at port IO map
|
; enable port access at port IO map
|
||||||
cli
|
|
||||||
pushad ; start enable io map
|
pushad ; start enable io map
|
||||||
|
|
||||||
cmp edx, 65536;16384
|
|
||||||
jae no_unmask_io; jge
|
|
||||||
mov eax, ecx
|
mov eax, ecx
|
||||||
; push ebp
|
|
||||||
xor ebp, ebp ; enable - eax = port
|
xor ebp, ebp ; enable - eax = port
|
||||||
|
cli
|
||||||
new_port_access:
|
new_port_access:
|
||||||
; pushad
|
|
||||||
call set_io_access_rights
|
call set_io_access_rights
|
||||||
; popad
|
|
||||||
inc eax
|
inc eax
|
||||||
cmp eax, edx
|
cmp eax, edx
|
||||||
jbe new_port_access
|
jbe new_port_access
|
||||||
; pop ebp
|
|
||||||
no_unmask_io:
|
no_unmask_io:
|
||||||
popad ; end enable io map
|
|
||||||
sti
|
sti
|
||||||
|
popad ; end enable io map
|
||||||
|
|
||||||
mov eax, [RESERVED_PORTS]
|
mov eax, [RESERVED_PORTS]
|
||||||
add eax, 1
|
inc eax
|
||||||
mov [RESERVED_PORTS], eax
|
mov [RESERVED_PORTS], eax
|
||||||
shl eax, 4
|
shl eax, 4
|
||||||
add eax, RESERVED_PORTS
|
add eax, RESERVED_PORTS
|
||||||
@ -3601,7 +3587,6 @@ no_unmask_io:
|
|||||||
|
|
||||||
free_port_area:
|
free_port_area:
|
||||||
|
|
||||||
; pushad
|
|
||||||
mov eax, [RESERVED_PORTS]; no reserved areas ?
|
mov eax, [RESERVED_PORTS]; no reserved areas ?
|
||||||
test eax, eax
|
test eax, eax
|
||||||
jz frpal2
|
jz frpal2
|
||||||
@ -3622,7 +3607,6 @@ free_port_area:
|
|||||||
dec eax
|
dec eax
|
||||||
jnz frpal3
|
jnz frpal3
|
||||||
frpal2:
|
frpal2:
|
||||||
; popad
|
|
||||||
inc eax
|
inc eax
|
||||||
ret
|
ret
|
||||||
frpal1:
|
frpal1:
|
||||||
@ -3636,27 +3620,21 @@ free_port_area:
|
|||||||
rep movsb
|
rep movsb
|
||||||
|
|
||||||
dec dword [RESERVED_PORTS]
|
dec dword [RESERVED_PORTS]
|
||||||
;popad
|
|
||||||
;disable port access at port IO map
|
;disable port access at port IO map
|
||||||
|
; start disable io map
|
||||||
; pushad ; start disable io map
|
|
||||||
pop eax ;start port
|
pop eax ;start port
|
||||||
cmp edx, 65536;16384
|
;cmp edx, 65536
|
||||||
jge no_mask_io
|
;jge no_mask_io
|
||||||
|
|
||||||
; mov eax,ecx
|
|
||||||
xor ebp, ebp
|
xor ebp, ebp
|
||||||
inc ebp
|
inc ebp
|
||||||
new_port_access_disable:
|
new_port_access_disable: ; disable - eax = port
|
||||||
; pushad
|
|
||||||
; mov ebp,1 ; disable - eax = port
|
|
||||||
call set_io_access_rights
|
call set_io_access_rights
|
||||||
; popad
|
|
||||||
inc eax
|
inc eax
|
||||||
cmp eax, edx
|
cmp eax, edx
|
||||||
jbe new_port_access_disable
|
jbe new_port_access_disable
|
||||||
no_mask_io:
|
no_mask_io: ; end disable io map
|
||||||
; popad ; end disable io map
|
|
||||||
xor eax, eax
|
xor eax, eax
|
||||||
ret
|
ret
|
||||||
;-----------------------------------------------------------------------------
|
;-----------------------------------------------------------------------------
|
||||||
|
Loading…
Reference in New Issue
Block a user