Subversion Repositories Kolibri OS

Rev

Rev 2923 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2923 Rev 2935
Line 1010... Line 1010...
1010
;;;;;;;;;;;;;;;;;;;;;;;
1010
;;;;;;;;;;;;;;;;;;;;;;;
Line 1011... Line 1011...
1011
 
1011
 
1012
align 4
1012
align 4
Line 1013... Line 1013...
1013
int_handler:
1013
int_handler:
Line 1014... Line 1014...
1014
 
1014
 
Line 1015... Line 1015...
1015
        DEBUGF  1,"IRQ %x ",eax:2                       ; no, you cant replace 'eax:2' with 'al', this must be a bug in FDO
1015
        DEBUGF  1,"\n%s int\n", my_service
1016
 
1016
 
1017
; find pointer of device wich made IRQ occur
1017
; find pointer of device wich made IRQ occur
1018
 
1018
 
1019
        mov     ecx, [devices]
1019
        mov     ecx, [devices]
1020
        test    ecx, ecx
1020
        test    ecx, ecx
Line 1021... Line 1021...
1021
        jz      .fail
1021
        jz      .nothing
1022
        mov     esi, device_list
1022
        mov     esi, device_list
1023
  .nextdevice:
1023
  .nextdevice:
1024
        mov     ebx, dword [esi]
1024
        mov     ebx, [esi]
1025
 
-
 
1026
        set_io  0
-
 
1027
        set_io  CSR5
1025
 
1028
        in      eax, dx
1026
        set_io  0
1029
        out     dx , eax                                ; send it back to ACK
-
 
1030
 
1027
        set_io  CSR5
1031
        and     eax, CSR7_DEFAULT                       ; int mask
1028
        in      eax, dx
1032
        test    eax, eax
1029
        out     dx, eax                                 ; send it back to ACK
1033
        jnz     .got_it
1030
        test    eax, eax
1034
 
1031
        jnz     .got_it
1035
  .continue:
1032
  .continue:
Line 1036... Line 1033...
1036
        add     esi, 4
1033
        add     esi, 4
Line 1037... Line 1034...
1037
        dec     ecx
1034
        dec     ecx
1038
        jnz     .nextdevice
-
 
1039
 
-
 
1040
        ret                                             ; If no device was found, abort (The irq was probably for a device, not registered to this driver)
-
 
1041
 
-
 
Line 1042... Line 1035...
1042
  .got_it:
1035
        jnz     .nextdevice
1043
 
1036
  .nothing:
Line 1044... Line 1037...
1044
        DEBUGF  1,"CSR7: %x ", eax
1037
        ret                                             ; If no device was found, abort (The irq was probably for a device, not registered to this driver)