Subversion Repositories Kolibri OS

Rev

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

Rev 1448 Rev 1709
Line 3... Line 3...
3
;; Copyright (C) KolibriOS team 2004-2008. All rights reserved. ;;
3
;; Copyright (C) KolibriOS team 2004-2008. 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: 1448 $
8
$Revision: 1709 $
9
 
9
 
10
 
10
 
Line 47... Line 47...
47
    cmp   [hd_error],0
47
    cmp   [hd_error],0
48
    jne   return_01
48
    jne   return_01
49
; Read through BIOS?
49
; Read through BIOS?
50
        cmp     [hdpos], 0x80
50
        cmp     [hdpos], 0x80
51
        jae     .bios
51
        jae     .bios
-
 
52
; hd_read_{dma,pio} use old ATA with 28 bit for sector number
-
 
53
        cmp     eax, 0x10000000
-
 
54
        jb      @f
-
 
55
        inc     [hd_error]
-
 
56
        jmp     return_01
-
 
57
@@:
52
; DMA read is permitted if [allow_dma_access]=1 or 2
58
; DMA read is permitted if [allow_dma_access]=1 or 2
53
        cmp     [allow_dma_access], 2
59
        cmp     [allow_dma_access], 2
54
        ja      .nodma
60
        ja      .nodma
55
        cmp     [dma_hdd], 1
61
        cmp     [dma_hdd], 1
56
        jnz     .nodma
62
        jnz     .nodma
Line 233... Line 239...
233
    pop   edi esi ecx
239
    pop   edi esi ecx
234
    ret
240
    ret
Line 235... Line 241...
235
 
241
 
236
align 4
242
align 4
-
 
243
cache_write_pio:
-
 
244
    cmp   dword[esi],0x10000000
237
cache_write_pio:
245
    jae   .bad
Line 238... Line 246...
238
;    call  disable_ide_int
246
;    call  disable_ide_int
239
 
247
 
240
    call  wait_for_hd_idle
248
    call  wait_for_hd_idle
Line 293... Line 301...
293
 
301
 
294
;    call  enable_ide_int
302
;    call  enable_ide_int
Line 295... Line 303...
295
    pop   esi ecx
303
    pop   esi ecx
-
 
304
 
-
 
305
    ret
-
 
306
.bad:
Line 296... Line 307...
296
 
307
    inc   [hd_error]
Line 297... Line 308...
297
    ret
308
    ret
298
 
309
 
Line 684... Line 695...
684
        mov     [cache_chain_size],1
695
        mov     [cache_chain_size],1
685
        mov     [cache_chain_pos],edi
696
        mov     [cache_chain_pos],edi
686
write_cache_chain:
697
write_cache_chain:
687
        cmp     [hdpos], 0x80
698
        cmp     [hdpos], 0x80
688
        jae     bd_write_cache_chain
699
        jae     bd_write_cache_chain
-
 
700
        mov     eax,[cache_chain_ptr]
-
 
701
        cmp     dword[eax],0x10000000
-
 
702
        jae     .bad
689
        push    esi
703
        push    esi
690
        mov     eax, IDE_descriptor_table
704
        mov     eax, IDE_descriptor_table
691
        mov     edx,eax
705
        mov     edx,eax
692
        pusha
706
        pusha
693
        mov     esi,[cache_chain_pos]
707
        mov     esi,[cache_chain_pos]
Line 777... Line 791...
777
@@:
791
@@:
778
        cmp     [hd_error], 0
792
        cmp     [hd_error], 0
779
        jnz     hd_write_error_dma
793
        jnz     hd_write_error_dma
780
        pop     esi
794
        pop     esi
781
        ret
795
        ret
-
 
796
.bad:
-
 
797
        inc     [hd_error]
-
 
798
        ret
Line 782... Line 799...
782
 
799
 
783
uglobal
800
uglobal
784
IDEContrRegsBaseAddr    dw      ?
801
IDEContrRegsBaseAddr    dw      ?
785
endg
802
endg