fix r2601

git-svn-id: svn://kolibrios.org@3320 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
CleverMouse 2013-03-04 11:01:50 +00:00
parent 13ac697261
commit 31e9ec37f4
2 changed files with 29 additions and 3 deletions

View File

@ -371,6 +371,33 @@ proc enable_irq stdcall, irq_line:dword
ret ret
endp endp
proc disable_irq stdcall, irq_line:dword
mov ebx, [irq_line]
cmp [irq_mode], IRQ_APIC
je .APIC
mov edx, 0x21
cmp ebx, 8
jb @F
mov edx, 0xA1
sub ebx, 8
@@:
in al, dx
bts eax, ebx
out dx, al
ret
.APIC:
shl ebx, 1
add ebx, 0x10
mov eax, ebx
call IOAPIC_read
or eax, 0x10000; bit 16
xchg eax, ebx
call IOAPIC_write
ret
endp
align 4 align 4
pci_irq_fixup: pci_irq_fixup:

View File

@ -359,9 +359,6 @@ send_scancode:
xor [kb_state], eax xor [kb_state], eax
xor [kb_lights], bl xor [kb_lights], bl
push ecx
call set_lights
pop ecx
.writekey: .writekey:
pushad pushad
; test for system hotkeys ; test for system hotkeys
@ -495,10 +492,12 @@ set_lights:
ret ret
ps2_set_lights: ps2_set_lights:
stdcall disable_irq, 1
mov al, 0xED mov al, 0xED
call kb_write call kb_write
mov al, [esp+8] mov al, [esp+8]
call kb_write call kb_write
stdcall enable_irq, 1
ret 8 ret 8
;// mike.dld ] ;// mike.dld ]