
VxWorks
BSP Developer’s Guide, 6.0
80
The modern interface to the PCI autoconfiguration library, starting with VxWorks
5.5, uses an initialization routine, a routine to set configuration options, and a
routine to do the actual configuration. This differs from past versions, which
created a structure with configuration options and passed a pointer to that
structure when calling the routine that does the actual configuration. Many
reference BSPs are written with the older interface. However, to use the full
capability, the new interface must be used as described in this document.
With the new interface, sysPciConfig( ) may look something like this:
void sysPciConfig()
{
void *pCookie;
pCookie = pciAutoConfigLibInit(NULL);
pciAutoCfgCtl(pCookie, PCI_OPTION, optionValue);
...
pciAutoCfgCtl(pCookie, PCI_OPTION, optionValue);
pciAutoCfg(pCookie);
}
The calls to pciAutoCfgCtl( ) configure the addresses and options to use during
configuration. The available options are listed below.
If no calls to pciAutoCfgCtl( ) are made, the PCI autoconfiguration code
enumerates the busses and attempts to configure devices on the bus. However,
because there is no default memory or I/O space available, no devices are actually
configured. For this reason, the absolute minimum BSP requirement is that some
memory or I/O space be specified. For example, the following four lines allow
devices to be configured only in the non-cachable 32-bit memory space. If any of
the devices that are present cannot be configured for this space, they are not
configured.
pCookie = pciAutoConfigLibInit(NULL);
pciAutoCfgCtl(pCookie, PCI_MEMIO32_LOC_SET, PCI_MEMIO32_ADDR);
pciAutoCfgCtl(pCookie, PCI_MEMIO32_SIZE_SET, PCI_MEMIO32_SIZE);
pciAutoCfg(pCookie);
Typically, several other options are set as well. The available options, and the
arguments they use, are discussed in the following sections. A more
comprehensive example is presented in Example 3-1.
Fast Back-To-Back Transmissions
PCI_FBB_ENABLE
BOOL * pArg
PCI_FBB_DISABLE
void
PCI_FBB_UPDATE
BOOL * pArg
PCI_FBB_STATUS_GET
BOOL * pArg
Comentários a estes Manuais