Subversion Repositories Kolibri OS

Rev

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

Rev 387 Rev 417
Line 32... Line 32...
32
        jne  no_pci_access_for_applications
32
        jne  no_pci_access_for_applications
Line 33... Line 33...
33
 
33
 
34
        or al,al
34
        or al,al
35
        jnz pci_fn_1
35
        jnz pci_fn_1
36
        ; PCI function 0: get pci version (AH.AL)
36
        ; PCI function 0: get pci version (AH.AL)
37
        movzx eax,word [0x2F0000+0x9022]
37
        movzx eax,word [BOOT_VAR+0x9022]
Line 38... Line 38...
38
        ret
38
        ret
39
 
39
 
40
pci_fn_1:
40
pci_fn_1:
Line 41... Line 41...
41
        cmp al,1
41
        cmp al,1
42
        jnz pci_fn_2
42
        jnz pci_fn_2
43
 
43
 
Line 44... Line 44...
44
        ; PCI function 1: get last bus in AL
44
        ; PCI function 1: get last bus in AL
45
        mov al,[0x2F0000+0x9021]
45
        mov al,[BOOT_VAR+0x9021]
46
        ret
46
        ret
47
 
47
 
48
pci_fn_2:
48
pci_fn_2:
49
        cmp al,2
49
        cmp al,2
50
        jne pci_fn_3
50
        jne pci_fn_3
Line 51... Line 51...
51
        ; PCI function 2: get pci access mechanism
51
        ; PCI function 2: get pci access mechanism
52
        mov al,[0x2F0000+0x9020]
52
        mov al,[BOOT_VAR+0x9020]
Line 106... Line 106...
106
;***************************************************************************
106
;***************************************************************************
Line 107... Line 107...
107
 
107
 
Line 108... Line 108...
108
align 4
108
align 4
109
 
109
 
110
pci_read_reg:
110
pci_read_reg:
Line 111... Line 111...
111
        cmp     byte [0x2F0000+0x9020],2 ;what mechanism will we use?
111
        cmp     byte [BOOT_VAR+0x9020],2 ;what mechanism will we use?
112
        je      pci_read_reg_2
112
        je      pci_read_reg_2
113
 
113
 
Line 236... Line 236...
236
;***************************************************************************
236
;***************************************************************************
Line 237... Line 237...
237
 
237
 
Line 238... Line 238...
238
align 4
238
align 4
239
 
239
 
240
pci_write_reg:
240
pci_write_reg:
Line 241... Line 241...
241
        cmp byte [0x2F0000+0x9020],2 ;what mechanism will we use?
241
        cmp byte [BOOT_VAR+0x9020],2 ;what mechanism will we use?
242
        je pci_write_reg_2
242
        je pci_write_reg_2
243
 
243