Subversion Repositories Kolibri OS

Rev

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

Rev 5363 Rev 6015
Line 3... Line 3...
3
;; Copyright (C) KolibriOS team 2014-2015. All rights reserved. ;;
3
;; Copyright (C) KolibriOS team 2014-2015. All rights reserved. ;;
4
;; Distributed under terms of the GNU General Public License    ;;
4
;; Distributed under terms of the GNU General Public License    ;;
5
;;                                                              ;;
5
;;                                                              ;;
6
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
6
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Line 7... Line 7...
7
 
7
 
Line 8... Line 8...
8
$Revision: 5363 $
8
$Revision: 6015 $
9
 
9
 
10
 
10
 
Line 376... Line 376...
376
.pata_ide:
376
.pata_ide:
377
        cmp     [ecx+IDE_DATA.RegsBaseAddres], 0
377
        cmp     [ecx+IDE_DATA.RegsBaseAddres], 0
378
        je      .end_set_interrupts
378
        je      .end_set_interrupts
Line 379... Line 379...
379
 
379
 
380
        push    ecx
380
        push    ecx
-
 
381
        stdcall attach_int_handler, 14, IDE_irq_14_handler, ecx
381
        stdcall attach_int_handler, 14, IDE_irq_14_handler, 0
382
        pop     ecx
-
 
383
        DEBUGF  1, "K : Set IDE IRQ14 return code %x\n", eax
382
        DEBUGF  1, "K : Set IDE IRQ14 return code %x\n", eax
384
        push    ecx
383
        stdcall attach_int_handler, 15, IDE_irq_15_handler, 0
385
        stdcall attach_int_handler, 15, IDE_irq_15_handler, ecx
384
        DEBUGF  1, "K : Set IDE IRQ15 return code %x\n", eax
386
        DEBUGF  1, "K : Set IDE IRQ15 return code %x\n", eax
Line 385... Line 387...
385
        pop     ecx
387
        pop     ecx
386
 
388
 
Line 398... Line 400...
398
; are disabled and no IDE devices. For example, notebook ASUS K72F -
400
; are disabled and no IDE devices. For example, notebook ASUS K72F -
399
; IDE controller 010185 generates false interrupt when we work with
401
; IDE controller 010185 generates false interrupt when we work with
400
; the IDE controller 01018f. For this reason, the interrupt handler
402
; the IDE controller 01018f. For this reason, the interrupt handler
401
; does not need to be installed if both channel IDE controller
403
; does not need to be installed if both channel IDE controller
402
; running in PIO mode.
404
; running in PIO mode.
-
 
405
 
-
 
406
; ...unfortunately, PCI interrupt can be shared with other devices
-
 
407
; which could enable it without consulting IDE code.
-
 
408
; So install the handler anyways and try to process
-
 
409
; even those interrupts which we are not expecting.
403
        cmp     [ecx+IDE_DATA.RegsBaseAddres], 0
410
        cmp     [ecx+IDE_DATA.RegsBaseAddres], 0
404
        je      .end_set_interrupts
411
        je      .end_set_interrupts
Line 405... Line -...
405
 
-
 
406
        cmp     [ecx+IDE_DATA.dma_hdd_channel_1], 0
-
 
407
        jne     @f
-
 
408
 
-
 
409
        cmp     [ecx+IDE_DATA.dma_hdd_channel_2], 0
-
 
410
        je      .end_set_interrupts
-
 
411
;--------------------------------------
-
 
412
@@:
412
 
413
        mov     ax, [ecx+IDE_DATA.Interrupt]
413
        mov     ax, [ecx+IDE_DATA.Interrupt]
414
        movzx   eax, al
414
        movzx   eax, al
415
        push    ecx
415
        push    ecx
416
        stdcall attach_int_handler, eax, IDE_common_irq_handler, 0
416
        stdcall attach_int_handler, eax, IDE_common_irq_handler, ecx
417
        pop     ecx
417
        pop     ecx
418
        DEBUGF  1, "K : Set IDE IRQ%d return code %x\n", [ecx+IDE_DATA.Interrupt]:1, eax
418
        DEBUGF  1, "K : Set IDE IRQ%d return code %x\n", [ecx+IDE_DATA.Interrupt]:1, eax
419
;--------------------------------------
419
;--------------------------------------
420
.end_set_interrupts:
420
.end_set_interrupts: