/kernel/trunk/core/dll.inc |
---|
24,7 → 24,16 |
mov eax, [handler] |
test eax, eax |
jz .err |
cmp [irq_owner + 4 * ebx], 0 |
jne .err |
mov [irq_tab+ebx*4], eax |
;push eax |
;mov eax, [TASK_BASE] |
;mov eax, [eax + TASKDATA.pid] |
mov [irq_owner + 4 * ebx], 1 |
;pop eax |
stdcall enable_irq, [irq] |
ret |
.err: |
59,83 → 68,69 |
irq_serv: |
.irq_1: |
push eax |
mov eax, 1 |
push 1 |
jmp .main |
align 4 |
.irq_2: |
push eax |
mov eax, 2 |
push 2 |
jmp .main |
align 4 |
.irq_3: |
push eax |
mov eax, 3 |
push 3 |
jmp .main |
align 4 |
.irq_4: |
push eax |
mov eax, 4 |
push 4 |
jmp .main |
align 4 |
.irq_5: |
push eax |
mov eax, 5 |
push 5 |
jmp .main |
align 4 |
.irq_6: |
push eax |
mov eax, 6 |
push 6 |
jmp .main |
align 4 |
.irq_7: |
push eax |
mov eax, 7 |
push 7 |
jmp .main |
align 4 |
.irq_8: |
push eax |
mov eax, 8 |
push 8 |
jmp .main |
align 4 |
.irq_9: |
push eax |
mov eax, 9 |
push 9 |
jmp .main |
align 4 |
.irq_10: |
push eax |
mov eax, 10 |
push 10 |
jmp .main |
align 4 |
.irq_11: |
push eax |
mov eax, 11 |
push 11 |
jmp .main |
align 4 |
.irq_12: |
push eax |
mov eax, 12 |
push 12 |
jmp .main |
align 4 |
.irq_13: |
push eax |
mov eax, 13 |
push 13 |
jmp .main |
align 4 |
.irq_14: |
push eax |
mov eax, 14 |
push 14 |
jmp .main |
align 4 |
.irq_15: |
push eax |
mov eax, 15 |
push 15 |
jmp .main |
align 16 |
.main: |
save_ring3_context |
mov eax, [esp + 32] |
mov bx, app_data ;os_data |
mov ds, bx |
mov es, bx |
151,9 → 146,8 |
mov [check_idle_semaphore],5 |
.exit: |
restore_ring3_context |
cmp eax, 8 |
cmp dword [esp + 32], 8 |
mov al, 0x20 |
jb @f |
out 0xa0, al |
160,7 → 154,9 |
@@: |
out 0x20, al |
pop eax |
restore_ring3_context |
add esp, 4 |
iret |
align 4 |
/kernel/trunk/core/exports.inc |
---|
18,6 → 18,8 |
szAttachIntHandler db 'AttachIntHandler',0 |
szFpuSave db 'FpuSave',0 |
szFpuRestore db 'FpuRestore',0 |
szReservePortArea db 'ReservePortArea',0 |
szBoot_Log db 'Boot_Log',0 |
szPciApi db 'PciApi', 0 |
szPciRead32 db 'PciRead32', 0 |
88,6 → 90,8 |
dd szAttachIntHandler, attach_int_handler |
dd szFpuSave , fpu_save |
dd szFpuRestore , fpu_restore |
dd szReservePortArea , r_f_port_area |
dd szBoot_Log , boot_log |
dd szPciApi , pci_api |
dd szPciRead32 , pci_read32 |
/kernel/trunk/core/sys32.inc |
---|
183,20 → 183,12 |
{ |
forward |
p_irq#num : |
save_ring3_context |
mov edi, num |
jmp irq_c |
jmp irqhandler |
} |
irqh 2,5,7,8,9,10,11 |
irqh 2,3,4,5,7,8,9,10,11 |
irq_c: |
mov ax, app_data ;os_data |
mov ds, ax |
mov es, ax |
call irqhandler |
restore_ring3_context |
iret |
p_irq6: |
save_ring3_context |
208,42 → 200,7 |
restore_ring3_context |
iret |
p_irq3: |
save_ring3_context |
mov ax, app_data ;os_data |
mov ds, ax |
mov es, ax |
cmp [com2_mouse_detected],0 |
je old_irq3_handler |
mov esi, com2_mouse |
mov dx, 2F8h ;[COMPortBaseAddr] |
call check_mouse_data_com |
jmp p_irq3_1 |
old_irq3_handler: |
mov edi,3 |
call irqhandler |
p_irq3_1: |
restore_ring3_context |
iret |
p_irq4: |
save_ring3_context |
mov ax, app_data ;os_data |
mov ds, ax |
mov es, ax |
cmp [com1_mouse_detected],0 |
je old_irq4_handler |
mov esi, com1_mouse |
mov dx, 3F8h ;[COMPortBaseAddr] |
call check_mouse_data_com |
jmp p_irq4_1 |
old_irq4_handler: |
mov edi,4 |
call irqhandler |
p_irq4_1: |
restore_ring3_context |
iret |
p_irq14: |
save_ring3_context |
mov ax, app_data ;os_data |
303,7 → 260,6 |
cmp [v86_irqhooks+edi*8], 0 |
jnz v86_irq2 |
push edi |
mov esi,edi ; 1 |
shl esi,6 ; 1 |
312,8 → 268,6 |
add edi,IRQ_SAVE |
mov ecx,16 |
mov [check_idle_semaphore],5 |
irqnewread: |
dec ecx |
js irqover |
368,15 → 322,6 |
irqfull: |
irqover: |
mov al,0x20 ; ready for next irq |
out 0x20,al |
pop ebx |
cmp ebx,7 |
jbe noa0 |
out 0xa0,al |
noa0: |
ret |