Is anyone else out there working on adding PCI enumeration to OpenBIOS? Any one have any pointers to code I can theft, er, reuse? I'm looking at the function pci_scan_bus() in the linux source code (drivers/pci/pci.c), but that looks like it just reads the results of an already-enummerated PCI bus.
Help would be greatly appreciated.
Brian
- To unsubscribe: send mail to majordomo@freiburg.linux.de with 'unsubscribe openbios' in the body of the message
Brian Hurt wrote:
Is anyone else out there working on adding PCI enumeration to OpenBIOS? Any one have any pointers to code I can theft, er, reuse? I'm looking at the function pci_scan_bus() in the linux source code (drivers/pci/pci.c), but that looks like it just reads the results of an already-enummerated PCI bus.
Scanning the PCI bus is easy. Look at linux/arch/i386/kernel/pci-*.c. Most modern PC motherboards support two well-known 32-bit I/O ports, which read and write to PCI configuration space. In the Linux kernel this is called the direct access method.
(this is all defined in the PCI spec) To scan the PCI bus, you basically iterate through each slot, reading the device and vendor ids. If the slot is empty you get a nonexistent value (either 0 or 0xffff I think). There can also be bridges on the PCI bus, so you must recursively descending into those, and scan their devices, as well.
On Sat, 26 Feb 2000, Jeff Garzik wrote:
(this is all defined in the PCI spec) To scan the PCI bus, you basically iterate through each slot, reading the device and vendor ids. If the slot is empty you get a nonexistent value (either 0 or 0xffff I think). There can also be bridges on the PCI bus, so you must recursively descending into those, and scan their devices, as well.
Haven't read the PCI bridges specs, but it seems that it is possible for two unconnected PCI bus since the algorithm suggested in revision 2.2 Chapter 6.1 is to scan all possible slots.
- To unsubscribe: send mail to majordomo@freiburg.linux.de with 'unsubscribe openbios' in the body of the message
On Sat, 26 Feb 2000, Brian Hurt wrote:
Is anyone else out there working on adding PCI enumeration to OpenBIOS? Any one have any pointers to code I can theft, er, reuse? I'm looking at the function pci_scan_bus() in the linux source code (drivers/pci/pci.c), but that looks like it just reads the results of an already-enummerated PCI bus.
you're looking in the wrong place. First, get a later kernel. Then look for PCI_DIRECT in a .c file and you should see it.
ron
- To unsubscribe: send mail to majordomo@freiburg.linux.de with 'unsubscribe openbios' in the body of the message
"Ronald G. Minnich" wrote:
On Sat, 26 Feb 2000, Brian Hurt wrote:
Is anyone else out there working on adding PCI enumeration to OpenBIOS? Any one have any pointers to code I can theft, er, reuse? I'm looking at the function pci_scan_bus() in the linux source code (drivers/pci/pci.c), but that looks like it just reads the results of an already-enummerated PCI bus.
you're looking in the wrong place. First, get a later kernel. Then look for PCI_DIRECT in a .c file and you should see it.
linux/arch/i386/kernel/pci-* linux/include/asm-i386/pci.h
On Sat, 26 Feb 2000, Brian Hurt wrote:
Is anyone else out there working on adding PCI enumeration to OpenBIOS? Any one have any pointers to code I can theft, er, reuse?
I have some code that does enumeration and memory assignment. The code was designed for a vxWorks firmware project for a system with such a large PCI bus structure that *every* commercial BIOS we have ever seen fails to correctly initialize the bus.
If no one has anything better to serve as a starting point, I'll ask if we can donate it.
- Colin Jensen - To unsubscribe: send mail to majordomo@freiburg.linux.de with 'unsubscribe openbios' in the body of the message
On Mon, 28 Feb 2000, Colin Jensen wrote:
I have some code that does enumeration and memory assignment. The code was designed for a vxWorks firmware project for a system with such a large PCI bus structure that *every* commercial BIOS we have ever seen fails to correctly initialize the bus.
If no one has anything better to serve as a starting point, I'll ask if we can donate it.
That sounds good to me. I'm intrigued that we see another example where bioses fail to configure a machine -- this example really ought to go on the openbios web page.
We should also be checking out linux pci config, as well as freebsd, netbsd, etc.
ron
- To unsubscribe: send mail to majordomo@freiburg.linux.de with 'unsubscribe openbios' in the body of the message
On Mon, 28 Feb 2000, Colin Jensen wrote:
I have some code that does enumeration and memory assignment. The code was designed for a vxWorks firmware project for a system with such a large PCI bus structure that *every* commercial BIOS we have ever seen fails to correctly initialize the bus.
If no one has anything better to serve as a starting point, I'll ask if we can donate it.
I guess I can use this code. Linux PCI_DIRECT does a very poor job.
Can you donate it?
thanks
ron
- To unsubscribe: send mail to majordomo@freiburg.linux.de with 'unsubscribe openbios' in the body of the message