3934,45 → 3934,44 |
align 4 |
|
get_irq_data: |
cmp eax,16 |
cmp ebx,16 |
jae .not_owner |
mov edx,eax ; check for correct owner |
shl edx,2 |
add edx,irq_owner |
mov edx,[edx] |
mov eax, [4 * ebx + irq_owner] |
|
mov edi,[TASK_BASE] |
mov edi,[edi+TASKDATA.pid] |
cmp edx,edi |
|
cmp eax,[edi+TASKDATA.pid] |
je gidril1 |
.not_owner: |
mov [esp+32],dword 2 ; ecx=2 |
mov [esp+28],dword 2 ; ecx=2 |
ret |
|
gidril1: |
|
mov ebx,eax |
shl ebx,12 |
add ebx,IRQ_SAVE |
mov eax,[ebx] |
mov ecx,1 |
test eax,eax |
lea eax,[ebx + IRQ_SAVE + 0x10] |
mov edx,[eax - 0x10] |
test edx,edx |
jz gid1 |
|
dec eax |
mov esi,ebx |
mov [ebx],eax |
movzx ebx,byte [ebx+0x10] |
add esi,0x10 |
mov edi,esi |
dec dword [eax - 0x10] |
|
movzx ebx,byte [eax] |
|
mov edi, eax |
xchg esi, eax |
inc esi |
|
mov ecx,4000 / 4 |
cld |
rep movsd |
; xor ecx,ecx ; as result of 'rep' ecx=0 |
dec edx |
gid1: |
mov [esp+36],eax |
mov [esp+32],ecx |
mov [esp+24],ebx |
mov [esp+32],edx |
mov [esp+28],ecx |
mov [esp+20],ebx |
ret |
|
|
5103,15 → 5102,16 |
align 4 |
|
syscall_getirqowner: ; GetIrqOwner |
cmp eax,16 |
|
cmp ebx,16 |
jae .err |
shl eax,2 |
add eax,irq_owner |
mov eax,[eax] |
mov [esp+36],eax |
|
mov eax,[4 * ebx + irq_owner] |
mov [esp+32],eax |
|
ret |
.err: |
or dword [esp+36], -1 |
or dword [esp+32], -1 |
ret |
|
align 4 |