#569 closed defect (fixed)

i386/pc386: pcibios.c lacks BusCountPCI

Reported by: Ralf Corsepius Owned by: Joel Sherrill
Priority: normal Milestone: 2
Component: bsps Version: 4.7
Severity: major Keywords:
Cc: bugs@… Blocked By:
Blocking:

Description

PROPOSED SOLUTION:
make BSP_pciFindDevice a wrapper that uses pcib_find_by_devid()

PROBLEM WAS:

The pc386 BSP lack an implementation of BusCountPCI().

This bug is exposed by my recent changes to RTEMS CVS-trunk:
i386-rtems4.7-gcc --pipe -B../../../../../lib/ -B../../../../../pc586/lib/ -specs bsp_specs -qrtems -mcpu=pentium -O4 -g -Wall -Wl,-Ttext,0x00100000 -o o-optimize/hello.obj o-optimize/init.o ../../../../../pc586/lib/no-dpmem.rel ../../../../../pc586/lib/no-event.rel ../../../../../pc586/lib/no-msg.rel ../../../../../pc586/lib/no-mp.rel ../../../../../pc586/lib/no-part.rel ../../../../../pc586/lib/no-signal.rel ../../../../../pc586/lib/no-timer.rel ../../../../../pc586/lib/no-rtmon.rel
../../../../../pc586/lib/librtemsbsp.a(startup.rel)(.text+0x4731): In function `BSP_pciFindDevice':
/users/rtems/src/rtems-cvs/build/i386/i386-rtems4.7/c/pc586/lib/libbsp/i386/pc386/../../../../../../../../../rtems.orig/c/src/lib/libbsp/i386/shared/pci/pcibios.c:231: undefined reference to `BusCountPCI'

Worse, a grep through the source-tree reveils BusCountPCI() to be in disorder:
# find -type f -exec grep -H BusCountPCI {} \;
./c/src/lib/libbsp/i386/shared/pci/pcibios.c: for (bus=0; bus<BusCountPCI(); bus++)
./c/src/lib/libbsp/powerpc/ppcn_60x/include/pci.h:extern unsigned8 BusCountPCI();
./c/src/lib/libbsp/powerpc/ppcn_60x/network/amd79c970.c: ucPCIBusCount=BusCountPCI();
./c/src/lib/libbsp/powerpc/ppcn_60x/pci/pci.c:unsigned8 BusCountPCI()
./c/src/lib/libbsp/powerpc/shared/irq/irq_init.c: maxBus = BusCountPCI();
./c/src/lib/libbsp/powerpc/shared/pci/pci.c: for(pbus=0; pbus< BusCountPCI(); pbus++)
./c/src/lib/libbsp/powerpc/shared/pci/pci.c: for(pbus=0; pbus< BusCountPCI(); pbus++)
./c/src/lib/libbsp/powerpc/shared/pci/pci.c:unsigned char BusCountPCI()
./c/src/lib/libbsp/powerpc/shared/pci/pci.h:extern unsigned char BusCountPCI();
./c/src/lib/libbsp/powerpc/shared/pci/pcifinddevice.c: for (bus=0; bus<BusCountPCI(); bus++) {
./c/src/lib/libbsp/powerpc/shared/startup/bspstart.c: printk("Number of PCI buses found is : %d\n", BusCountPCI());
./c/src/libchip/network/pci.h:extern unsigned char BusCountPCI();

Release:
RTEMS-4.7

How-To-Repeat:
With RTEMS-CVS-trunk:
configure --target=i386-rtems4.7
make RTEMS_BSP=pc586

Attachments (1)

i386-pcifinddev.diff (2.7 KB) - added by Ralf Corsepius on Dec 3, 2006 at 1:31:12 PM.
i386-pcifinddev.diff

Download all attachments as: .zip

Change History (2)

comment:1 Changed on Sep 27, 2004 at 2:16:18 PM by Joel Sherrill

Status: assignedclosed

State-Changed-From-To: open->closed
State-Changed-Why: Dupe of PR608.

Changed on Dec 3, 2006 at 1:31:12 PM by Ralf Corsepius

Attachment: i386-pcifinddev.diff added

i386-pcifinddev.diff

Note: See TracTickets for help on using tickets.