FreeBSD/sys/boot/i386/libi386/biospci.c
/*
 * Counts the number of instances of devid we have in the system, as least as
 * far as the PCI BIOS is able to tell.
 */
Counts the number of instances of devid we have in the system, as least as
far as the PCI BIOS is able to tell.
Counts the number of instances of devid we have in the system as least as far as the PCI BIOS is able to tell .
int
biospci_count_device_type(uint32_t devid)
{
	int i;
	for (i = 0; 1; i++) {
		v86.ctl = V86_FLAGS;
		v86.addr = PCI_INT;
		v86.eax = FIND_PCI_DEVICE;
		v86.edx = devid & 0xffff;		
		v86.ecx = (devid >> 16) & 0xffff;	
		v86.esi = i;
		v86int();
		if (V86_CY(v86.efl) || (v86.eax & 0xff00))
			break;
	}
	return i;
}
int biospci_count_device_type ( uint32_t devid ) { int i ; for ( i = 0 ; 1 ; i ++ ) { v86 . ctl = V86_FLAGS ; v86 . addr = PCI_INT ; v86 . eax = FIND_PCI_DEVICE ; v86 . edx = devid & 0xffff ; v86 . ecx = ( devid >> 16 ) & 0xffff ; v86 . esi = i ; v86int ( ) ; if ( V86_CY ( v86 . efl ) || ( v86 . eax & 0xff00 ) ) break ; } return i ; }
Counts the number of instances of devid we have in the system, as least as
 far as the PCI BIOS is able to tell.
Counts the number of instances of devid we have in the system as least as far as the PCI BIOS is able to tell .
/* EDX - Vendor ID */ /* ECX - Device ID */