Subversion Repositories Kolibri OS

Rev

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

Rev 431 Rev 465
Line 1... Line 1...
1
$Revision: 431 $
1
$Revision: 465 $
2
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
2
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
3
;;                                                              ;;
3
;;                                                           ;;
4
;; Copyright (C) KolibriOS team 2004-2007. All rights reserved. ;;
4
;; Copyright (C) KolibriOS team 2004-2007. All rights reserved. ;;
5
;; Distributed under terms of the GNU General Public License    ;;
5
;; Distributed under terms of the GNU General Public License    ;;
6
;;                                                              ;;
6
;;                                                              ;;
Line 37... Line 37...
37
        jne  no_pci_access_for_applications
37
        jne  no_pci_access_for_applications
Line 38... Line 38...
38
 
38
 
39
        or al,al
39
        or al,al
40
        jnz pci_fn_1
40
        jnz pci_fn_1
41
        ; PCI function 0: get pci version (AH.AL)
41
        ; PCI function 0: get pci version (AH.AL)
42
        movzx eax,word [0x2F0000+0x9022]
42
        movzx eax,word [BOOT_VAR+0x9022]
Line 43... Line 43...
43
        ret
43
        ret
44
 
44
 
45
pci_fn_1:
45
pci_fn_1:
Line 46... Line 46...
46
        cmp al,1
46
        cmp al,1
47
        jnz pci_fn_2
47
        jnz pci_fn_2
48
 
48
 
Line 49... Line 49...
49
        ; PCI function 1: get last bus in AL
49
        ; PCI function 1: get last bus in AL
50
        mov al,[0x2F0000+0x9021]
50
        mov al,[BOOT_VAR+0x9021]
51
        ret
51
        ret
52
 
52
 
53
pci_fn_2:
53
pci_fn_2:
54
        cmp al,2
54
        cmp al,2
55
        jne pci_fn_3
55
        jne pci_fn_3
Line 56... Line 56...
56
        ; PCI function 2: get pci access mechanism
56
        ; PCI function 2: get pci access mechanism
57
        mov al,[0x2F0000+0x9020]
57
        mov al,[BOOT_VAR+0x9020]
Line 111... Line 111...
111
;***************************************************************************
111
;***************************************************************************
Line 112... Line 112...
112
 
112
 
Line 113... Line 113...
113
align 4
113
align 4
114
 
114
 
115
pci_read_reg:
115
pci_read_reg:
Line 116... Line 116...
116
        cmp     byte [0x2F0000+0x9020],2 ;what mechanism will we use?
116
        cmp     byte [BOOT_VAR+0x9020],2 ;what mechanism will we use?
117
        je      pci_read_reg_2
117
        je      pci_read_reg_2
118
 
118
 
Line 241... Line 241...
241
;***************************************************************************
241
;***************************************************************************
Line 242... Line 242...
242
 
242
 
Line 243... Line 243...
243
align 4
243
align 4
244
 
244
 
245
pci_write_reg:
245
pci_write_reg:
Line 246... Line 246...
246
        cmp byte [0x2F0000+0x9020],2 ;what mechanism will we use?
246
        cmp byte [BOOT_VAR+0x9020],2 ;what mechanism will we use?
247
        je pci_write_reg_2
247
        je pci_write_reg_2
248
 
248