[ECOS] cyg_pci_configure_device and active PCI devices

Nick Garnett nickg@cygnus.co.uk
Fri Oct 6 05:30:00 GMT 2000

Fabrice Gautier <Fabrice_Gautier@sdesigns.com> writes:

> Hi,
> When initializing the ethernet device, cyg_pci_configure_device fails
> because the device is "active".
> This test fail:
> // Check that device is inactive.
>     if ((dev_info->command & CYG_PCI_CFG_COMMAND_ACTIVE) != 0)
>        return false; 
> When I run a PCI scan all the devices are activated. I don't really know
> what does that means and why the configure_device function have to abort in
> this case. Could it be that in the case of the PC, the bios "activate" (and
> may be "configure") all the cards on the pci bus?
> So how do I manage this ? Should the devices be deactivated or should I
> consider the configuration is already done and ok?

On PCs the BIOS usually configures the PCI devices. It has to do this
since it may have to make use of the graphics card and any SCSI
adaptor to boot the OS. The PCI standard says that once a device has
been activated, it need not necessarily support being deactivated and

The eCos PCI code is really designed for harware where we have to
initialize the PCI devices ourselves. So the only thing you can do is
call cyg_pci_get_device_info(). But you will then have to do the PCI
address space to CPU address space translation yourself, since this is
only filled in during the configure operation.

Nick Garnett, eCos Kernel Architect
Red Hat, Cambridge, UK

More information about the Ecos-discuss mailing list