Subversion Repositories Kolibri OS

Rev

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

Rev 3762 Rev 3774
Line 3... Line 3...
3
;; Copyright (C) KolibriOS team 2004-2013. All rights reserved. ;;
3
;; Copyright (C) KolibriOS team 2004-2013. 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: 3762 $
8
$Revision: 3774 $
9
 
9
 
10
 
10
 
Line 75... Line 75...
75
; 2. Acquire the global lock.
75
; 2. Acquire the global lock.
76
        mov     ecx, ide_mutex
76
        mov     ecx, ide_mutex
77
        call    mutex_lock
77
        call    mutex_lock
78
        mov     ecx, ide_channel2_mutex
78
        mov     ecx, ide_channel2_mutex
79
        mov     eax, [hd_data]
79
        mov     eax, [hd_data]
-
 
80
        push    ecx
-
 
81
        mov     ecx, [hd_address_table]
80
        cmp     [eax+HD_DATA.hdbase], 0x1F0
82
        cmp     [eax+HD_DATA.hdbase], ecx ; 0x1F0
-
 
83
        pop     ecx
81
        jne     .IDE_Channel_2
84
        jne     .IDE_Channel_2
82
        mov     ecx, ide_channel1_mutex
85
        mov     ecx, ide_channel1_mutex
83
.IDE_Channel_2:
86
.IDE_Channel_2:
84
        mov     [channel_lock], ecx
87
        mov     [channel_lock], ecx
85
        call    mutex_lock
88
        call    mutex_lock
Line 156... Line 159...
156
; 2. Acquire the global lock.
159
; 2. Acquire the global lock.
157
        mov     ecx, ide_mutex
160
        mov     ecx, ide_mutex
158
        call    mutex_lock
161
        call    mutex_lock
159
        mov     ecx, ide_channel2_mutex
162
        mov     ecx, ide_channel2_mutex
160
        mov     eax, [hd_data]
163
        mov     eax, [hd_data]
-
 
164
        push    ecx
-
 
165
        mov     ecx, [hd_address_table]
161
        cmp     [eax+HD_DATA.hdbase], 0x1F0
166
        cmp     [eax+HD_DATA.hdbase], ecx ; 0x1F0
-
 
167
        pop     ecx
162
        jne     .IDE_Channel_2
168
        jne     .IDE_Channel_2
163
        mov     ecx, ide_channel1_mutex
169
        mov     ecx, ide_channel1_mutex
164
.IDE_Channel_2:
170
.IDE_Channel_2:
165
        mov     [channel_lock], ecx
171
        mov     [channel_lock], ecx
166
        call    mutex_lock
172
        call    mutex_lock
Line 846... Line 852...
846
        mov     eax, IDE_descriptor_table
852
        mov     eax, IDE_descriptor_table
847
        mov     dword [eax], IDE_DMA
853
        mov     dword [eax], IDE_DMA
848
        mov     word [eax+4], 0x2000
854
        mov     word [eax+4], 0x2000
849
        sub     eax, OS_BASE
855
        sub     eax, OS_BASE
850
        mov     dx, [IDEContrRegsBaseAddr]
856
        mov     dx, [IDEContrRegsBaseAddr]
-
 
857
        push    eax
-
 
858
        mov     eax, [hd_address_table]
851
        cmp     [hdbase], 0x1F0
859
        cmp     [hdbase], eax ; 0x1F0
-
 
860
        pop     eax
852
        jz      @f
861
        jz      @f
853
        add     edx, 8
862
        add     edx, 8
854
@@:
863
@@:
855
        push    edx
864
        push    edx
856
        add     edx, 4
865
        add     edx, 4
Line 1003... Line 1012...
1003
        cld
1012
        cld
1004
        rep movsd
1013
        rep movsd
1005
        popa
1014
        popa
1006
        sub     eax, OS_BASE
1015
        sub     eax, OS_BASE
1007
        mov     dx, [IDEContrRegsBaseAddr]
1016
        mov     dx, [IDEContrRegsBaseAddr]
-
 
1017
        push    eax
-
 
1018
        mov     eax, [hd_address_table]
1008
        cmp     [hdbase], 0x1F0
1019
        cmp     [hdbase], eax ; 0x1F0
-
 
1020
        pop     eax
1009
        jz      @f
1021
        jz      @f
1010
        add     edx, 8
1022
        add     edx, 8
1011
@@:
1023
@@:
1012
        push    edx
1024
        push    edx
1013
        add     edx, 4
1025
        add     edx, 4