Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 7131 → Rev 7132

/kernel/trunk/bus/pci/pci16.inc
24,15 → 24,15
 
xor ax, ax
mov es, ax
mov byte [es:BOOT_PCI_DATA], 1;default mechanism:1
mov byte [es:BOOT_LO.pci_data], 1;default mechanism:1
mov ax, 0xb101
int 0x1a
or ah, ah
jnz pci16skip
 
mov [es:BOOT_PCI_DATA+1], cl;last PCI bus in system
mov [es:BOOT_PCI_DATA+2], bx
mov [es:BOOT_PCI_DATA+4], edi
mov [es:BOOT_LO.pci_data+1], cl;last PCI bus in system
mov word[es:BOOT_LO.pci_data+2], bx
mov dword[es:BOOT_LO.pci_data+4], edi
 
; we have a PCI BIOS, so check which configuration mechanism(s)
; it supports
41,7 → 41,7
jnz pci16skip
test al, 2
jz pci16skip
mov byte [es:BOOT_PCI_DATA], 2; if (al&3)==2 => mechanism 2
mov byte [es:BOOT_LO.pci_data], 2; if (al&3)==2 => mechanism 2
 
pci16skip:
 
/kernel/trunk/bus/pci/pci32.inc
101,17 → 101,17
 
pci_fn_0:
; PCI function 0: get pci version (AH.AL)
movzx eax, word [BOOT_VARS+BOOT_PCI_DATA+2]
movzx eax, word [BOOT.pci_data+2]
ret
 
pci_fn_1:
; PCI function 1: get last bus in AL
mov al, [BOOT_VARS+BOOT_PCI_DATA+1]
mov al, [BOOT.pci_data+1]
ret
 
pci_fn_2:
; PCI function 2: get pci access mechanism
mov al, [BOOT_VARS+BOOT_PCI_DATA]
mov al, [BOOT.pci_data]
ret
 
pci_service_not_supported:
156,7 → 156,7
 
pci_read_reg:
push ebx esi
cmp byte [BOOT_VARS+BOOT_PCI_DATA], 2;what mechanism will we use?
cmp byte [BOOT.pci_data], 2;what mechanism will we use?
je pci_read_reg_2
 
; mechanism 1
260,7 → 260,7
 
pci_write_reg:
push esi ebx
cmp byte [BOOT_VARS+BOOT_PCI_DATA], 2;what mechanism will we use?
cmp byte [BOOT.pci_data], 2;what mechanism will we use?
je pci_write_reg_2
 
; mechanism 1
519,9 → 519,9
cmp ebp, 1 ; PCI_FUNCTION_ID
jnz .not_PCI_BIOS_PRESENT
mov edx, 'PCI '
mov al, [BOOT_VARS + BOOT_PCI_DATA]
mov bx, [BOOT_VARS + BOOT_PCI_DATA + 2]
mov cl, [BOOT_VARS + BOOT_PCI_DATA + 1]
mov al, [BOOT.pci_data]
mov bx, word[BOOT.pci_data + 2]
mov cl, [BOOT.pci_data + 1]
xor ah, ah
jmp .return_abcd
 
665,7 → 665,7
.next_func:
inc dword [.devfn]
mov ah, [.bus]
cmp ah, [BOOT_VARS+BOOT_PCI_DATA+1]
cmp ah, [BOOT.pci_data+1]
jbe .loop
.nomemory:
leave