I'm adding PCI support to the kernel i'm working on.
here's the asm code i use to detect the PCI bios
Code: Select all
.....
_find_pci_bios:
push ebp
mov ebp,esp
mov ebx,dword [ebp+8]
mov [ptr32],dword ebx
mov [ptr16],word KERNEL_CODE_SEL
mov eax,0x49435024 ;$PCI string needed for
mov ebx,0 ;bios32 function call
call far [ptr32]
pop ebp
ret
[section .data]
ptr32 dd 0
ptr16 KERNEL_CODE_SEL
[ebp+8] is the address of Bios32 service directory
According to the doc, on return from the far call
if AL = 00h then PCI bios is available
if AL = 80h then PCI bios is NOT available.
Using this fucntion, I get AL=80h in Bochs (but AL=00h on REAL pc) but the bochs spec state that Bios32 and PIC bios are supported.
has anyone tried detection PCI bios in bochs and how did you do it. Thanks