Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 7121 → Rev 7122

/kernel/trunk/bus/pci/pci16.inc
24,15 → 24,15
 
xor ax, ax
mov es, ax
mov byte [es:0x9020], 1;default mechanism:1
mov byte [es:BOOT_PCI_DATA], 1;default mechanism:1
mov ax, 0xb101
int 0x1a
or ah, ah
jnz pci16skip
 
mov [es:0x9021], cl;last PCI bus in system
mov [es:0x9022], bx
mov [es:0x9024], edi
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
 
; 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:0x9020], 2; if (al&3)==2 => mechanism 2
mov byte [es:BOOT_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+0x9022]
movzx eax, word [BOOT_VARS+BOOT_PCI_DATA+2]
ret
 
pci_fn_1:
; PCI function 1: get last bus in AL
mov al, [BOOT_VARS+0x9021]
mov al, [BOOT_VARS+BOOT_PCI_DATA+1]
ret
 
pci_fn_2:
; PCI function 2: get pci access mechanism
mov al, [BOOT_VARS+0x9020]
mov al, [BOOT_VARS+BOOT_PCI_DATA]
ret
 
pci_service_not_supported:
156,7 → 156,7
 
pci_read_reg:
push ebx esi
cmp byte [BOOT_VARS+0x9020], 2;what mechanism will we use?
cmp byte [BOOT_VARS+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+0x9020], 2;what mechanism will we use?
cmp byte [BOOT_VARS+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 + 0x9020]
mov bx, [BOOT_VARS + 0x9022]
mov cl, [BOOT_VARS + 0x9021]
mov al, [BOOT_VARS + BOOT_PCI_DATA]
mov bx, [BOOT_VARS + BOOT_PCI_DATA + 2]
mov cl, [BOOT_VARS + 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+0x9021]
cmp ah, [BOOT_VARS+BOOT_PCI_DATA+1]
jbe .loop
.nomemory:
leave