pc386 PCI question

Till Straumann strauman at slac.stanford.edu
Tue Apr 6 16:37:49 UTC 2004


gregory.menke at gsfc.nasa.gov wrote:
> Joel Sherrill writes:
>  > 
>  > This was sent directly to me and the return address
>  > appeared to be hidden.  First, I don't know what network
>  > device driver is being used.  Second, this is an
>  > apparent inconsistency in the i386/shared code.  The
>  > file pci/pcibios.c is referencing those symbols
>  > (BusCountPCI and BSP_pciFindDevice) and I do not know
>  > where (or if) they are supposed to be.  I would appreciate
>  > some insite from someone out there so this can really be
>  > resolved.
>  > 
>  > --joel
> 

BSP_pciFindDevice() was introduced by PR432.

Note that libbsp/i386/shared/pcibios.c *already*
ships pcib_find_by_devid() which, I suppose, provides
the desired functionality.

What's really needed is not a second implementation
but a unified API (as has been noted previously).

All that's needed is a willing person to take on the job ;-)

It would make sense to adopt an API defined by an OS where
most drivers are expected to be ported from.

-- Till

> This is the case where the x86 and ppc PCI support not being
> integrated is causing trouble.  These functions were originally
> implemented in libbsp/powerpc/shared/pci, but lacking a unified PCI
> api, some time ago I ported them to i386/shared/pcibios.c to provide
> functionality in support of the elnk and dec21140 drivers.
> 
> i386/shared/pci/pcibios.c implements BSP_pciFindDevice, but that
> function requires BusCountPCI.  However I don't see where BusCountPCI
> got off to- it should be imiplemented in pcibios.c.  I think it got
> removed somehow since I did build-test the drivers for i386.  Until
> someone who knows how to make the pcibios calls in i386 go shows up to
> obtain a real bus count, a temporary workaround could be to add the
> following to pcibios.c;
> 
> 
> unsigned char BusCountPCI()
> {
>   return 1;
> }
> 
> this will support pci busses with no bridges to secondary busses,
> which should handle pc kinds of systems.  A proper solution is to use
> the pcibios calls to probe the PCI bus at boot time to find its
> extent.
> 
> Gregm
> 





More information about the users mailing list