Subversion Repositories Kolibri OS

Rev

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

Rev 2863 Rev 2935
Line 12... Line 12...
12
;;          GNU GENERAL PUBLIC LICENSE                              ;;
12
;;          GNU GENERAL PUBLIC LICENSE                              ;;
13
;;             Version 2, June 1991                                 ;;
13
;;             Version 2, June 1991                                 ;;
14
;;                                                                  ;;
14
;;                                                                  ;;
15
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
15
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Line 16... Line 16...
16
 
16
 
Line 17... Line 17...
17
; $Revision: 2863 $
17
; $Revision: 2935 $
Line 18... Line 18...
18
 
18
 
Line 1023... Line 1023...
1023
;;;;;;;;;;;;;;;;;;;;;;;
1023
;;;;;;;;;;;;;;;;;;;;;;;
Line 1024... Line 1024...
1024
 
1024
 
1025
align 4
1025
align 4
Line 1026... Line 1026...
1026
int_handler:
1026
int_handler:
Line 1027... Line 1027...
1027
 
1027
 
Line 1028... Line -...
1028
;       DEBUGF  1,"IRQ %x ",eax:2                   ; no, you cant replace 'eax:2' with 'al', this must be a bug in FDO
-
 
1029
 
1028
        DEBUGF  1,"\n%s int\n", my_service
1030
; find pointer of device wich made IRQ occur
1029
 
1031
 
1030
; find pointer of device wich made IRQ occur
-
 
1031
 
1032
        mov     esi, device_list
1032
        mov     ecx, [devices]
1033
        mov     ecx, [devices]
1033
        test    ecx, ecx
1034
        test    ecx, ecx
-
 
Line -... Line 1034...
-
 
1034
        jz      .nothing
1035
        jz      .abort
1035
        mov     esi, device_list
1036
  .nextdevice:
1036
  .nextdevice:
1037
        mov     ebx, dword [esi]
1037
        mov     ebx, [esi]
1038
        mov     edx, [device.io_addr]     ; get IRQ reason
1038
 
1039
 
-
 
1040
        push    ecx
1039
        mov     edx, [device.io_addr]     ; get IRQ reason
1041
        xor     ecx, ecx ; CSR0
1040
        push    ecx
1042
        call    [device.access_read_csr]
1041
        xor     ecx, ecx ; CSR0
1043
        pop     ecx
1042
        call    [device.access_read_csr]
-
 
1043
        pop     ecx
1044
 
1044
        test    al, al
1045
        test    al , al
1045
        js      .got_it
1046
        js      .got_it
1046
  .continue:
Line 1047... Line 1047...
1047
 
1047
        add     esi, 4
-
 
1048
        dec     ecx
-
 
1049
        jnz     .nextdevice
-
 
1050
  .nothing:
1048
        add     esi, 4
1051
        ret                                         ; If no device was found, abort (The irq was probably for a device, not registered to this driver
1049
        loop    .nextdevice
1052
 
1050
 
1053
  .got_it:
1051
        ret                                         ; If no device was found, abort (The irq was probably for a device, not registered to this driver
1054
 
1052
 
1055
        DEBUGF  1,"Device: %x Status: %x ", ebx, eax:2