Subversion Repositories Kolibri OS

Rev

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

Rev 7122 Rev 7132
Line 19... Line 19...
19
;;                                                              ;;
19
;;                                                              ;;
20
;;  See file COPYING for details                                ;;
20
;;  See file COPYING for details                                ;;
21
;;                                                              ;;
21
;;                                                              ;;
22
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
22
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Line 23... Line 23...
23
 
23
 
Line 24... Line 24...
24
$Revision: 7122 $
24
$Revision: 7132 $
25
 
25
 
26
;***************************************************************************
26
;***************************************************************************
27
;   Function
27
;   Function
Line 99... Line 99...
99
 
99
 
Line 100... Line 100...
100
;; ============================================
100
;; ============================================
101
 
101
 
102
pci_fn_0:
102
pci_fn_0:
103
; PCI function 0: get pci version (AH.AL)
103
; PCI function 0: get pci version (AH.AL)
Line 104... Line 104...
104
        movzx   eax, word [BOOT_VARS+BOOT_PCI_DATA+2]
104
        movzx   eax, word [BOOT.pci_data+2]
105
        ret
105
        ret
106
 
106
 
107
pci_fn_1:
107
pci_fn_1:
Line 108... Line 108...
108
; PCI function 1: get last bus in AL
108
; PCI function 1: get last bus in AL
109
        mov     al, [BOOT_VARS+BOOT_PCI_DATA+1]
109
        mov     al, [BOOT.pci_data+1]
110
        ret
110
        ret
111
 
111
 
Line 112... Line 112...
112
pci_fn_2:
112
pci_fn_2:
113
; PCI function 2: get pci access mechanism
113
; PCI function 2: get pci access mechanism
114
        mov     al, [BOOT_VARS+BOOT_PCI_DATA]
114
        mov     al, [BOOT.pci_data]
Line 154... Line 154...
154
 
154
 
Line 155... Line 155...
155
align 4
155
align 4
156
 
156
 
157
pci_read_reg:
157
pci_read_reg:
158
        push    ebx esi
158
        push    ebx esi
Line 159... Line 159...
159
        cmp     byte [BOOT_VARS+BOOT_PCI_DATA], 2;what mechanism will we use?
159
        cmp     byte [BOOT.pci_data], 2;what mechanism will we use?
160
        je      pci_read_reg_2
160
        je      pci_read_reg_2
161
 
161
 
Line 258... Line 258...
258
 
258
 
Line 259... Line 259...
259
align 4
259
align 4
260
 
260
 
261
pci_write_reg:
261
pci_write_reg:
262
        push    esi ebx
262
        push    esi ebx
Line 263... Line 263...
263
        cmp     byte [BOOT_VARS+BOOT_PCI_DATA], 2;what mechanism will we use?
263
        cmp     byte [BOOT.pci_data], 2;what mechanism will we use?
264
        je      pci_write_reg_2
264
        je      pci_write_reg_2
265
 
265
 
Line 517... Line 517...
517
        ;-=-=-=-=-=-=-=-=
517
        ;-=-=-=-=-=-=-=-=
518
.emulate_bios:
518
.emulate_bios:
519
        cmp     ebp, 1                  ; PCI_FUNCTION_ID
519
        cmp     ebp, 1                  ; PCI_FUNCTION_ID
520
        jnz     .not_PCI_BIOS_PRESENT
520
        jnz     .not_PCI_BIOS_PRESENT
521
        mov     edx, 'PCI '
521
        mov     edx, 'PCI '
522
        mov     al, [BOOT_VARS + BOOT_PCI_DATA]
522
        mov     al, [BOOT.pci_data]
523
        mov     bx, [BOOT_VARS + BOOT_PCI_DATA + 2]
523
        mov     bx, word[BOOT.pci_data + 2]
524
        mov     cl, [BOOT_VARS + BOOT_PCI_DATA + 1]
524
        mov     cl, [BOOT.pci_data + 1]
525
        xor     ah, ah
525
        xor     ah, ah
526
        jmp     .return_abcd
526
        jmp     .return_abcd
Line 527... Line 527...
527
 
527
 
528
.not_PCI_BIOS_PRESENT:
528
.not_PCI_BIOS_PRESENT:
Line 663... Line 663...
663
.no_device:
663
.no_device:
664
        or      byte [.devfn], 7
664
        or      byte [.devfn], 7
665
.next_func:
665
.next_func:
666
        inc     dword [.devfn]
666
        inc     dword [.devfn]
667
        mov     ah, [.bus]
667
        mov     ah, [.bus]
668
        cmp     ah, [BOOT_VARS+BOOT_PCI_DATA+1]
668
        cmp     ah, [BOOT.pci_data+1]
669
        jbe     .loop
669
        jbe     .loop
670
.nomemory:
670
.nomemory:
671
        leave
671
        leave
672
        ret
672
        ret
673
endp
673
endp