Спасибо.
Ну вобщем ближе к делу. Пользуюсь 0.7.7.0, другово недоступною
переписан kernel/bus/pci/pci16.inc
Code:
$Revision: 593 $
;---------------------------------------------------------------------------------------------------
; code determines which mechanism to access PCI bus is available and suported by the bus
;---------------------------------------------------------------------------------------------------
push ds
xor edi, edi
mov ds, di
mov dword [BOOT_PCI_DATA], 1 ; default to mechanism 1 and zero other bytes
mov dword [BOOT_PCI_DATA+4], edi
mov ax, 0xb101
int 0x1a
test ah, ah ; apparently command decision has been made to give
jnz @f ; some slack to the fact of PCI BIOS absence
; bit 1 of AL indicates presence of mechanism 2
bt ax, 1 ; bit_1 -> CF
adc byte [BOOT_PCI_DATA], 0 ; 1 += CF
mov [BOOT_PCI_DATA+1], cl ; numerically highest PCI bus in system
mov [BOOT_PCI_DATA+2], bx ; bl-minor version, bh-major version
mov [BOOT_PCI_DATA+4], edi ; address of protected mode entry
; by the way mechanism #1 is good and #2 is bad because legacy
@@:
pop ds
начало kernel/bus/pci/pci32.inc (прямо в глаза бросались старые прыжки)
Code:
$Revision: 750 $
align 4
pci_api:
cmp [pci_access_enabled], 1
jne .no_pci_access_for_applications
cmp al, 10
ja .no_pci_access_for_applications
cmp al, 7
ja pci_write_reg
jz .no_pci_access_for_applications
cmp al, 3
ja pci_read_reg
jz .no_pci_access_for_applications
test al, al
jz .fn_0_version
neg eax
movzx eax, byte [BOOT_VAR+BOOT_PCI_DATA+2+eax] ; get either highest bus # or access method
jmp .exit
.fn_0_version:
movzx eax, word [BOOT_VAR+BOOT_PCI_DATA+2] ; PCI function 0: get pci version (AH.AL)
.exit:
ret
.no_pci_access_for_applications:
mov eax, -1
jmp .exit
Тут ещё такой вопрос. Далее в pci32.inc вы читаете по 1,2,4 бата. Для чего лишний код? Помоему вобще все запросы к PCI чипсет переделывает в DWORD запросы.