How can I find the maximum PCI bus number of the system?
The PCI bios calls need to be able to return this information. It also helps when scanning for pci devices, because then we don't have to check for all 256 possible buses.
Right now, SeaBIOS has a compile time definition for the max, but that is awkward and it can lead to hard to debug failures.
Ideas? -Kevin
On Sat, Nov 8, 2008 at 6:52 PM, Kevin O'Connor kevin@koconnor.net wrote:
How can I find the maximum PCI bus number of the system?
we can define the set of things that seabios needs to know and pass them on from coreboot.
Personally, I would prefer textual attribute-value pairs, since binary structs have a lot of problems (version, etc. etc.)
ron
ron minnich wrote:
How can I find the maximum PCI bus number of the system?
we can define the set of things that seabios needs to know and pass them on from coreboot.
Personally, I would prefer textual attribute-value pairs, since binary structs have a lot of problems (version, etc. etc.)
How about device tree?
Again, check out /usr/src/linux/Documentation/powerpc/booting-without-of.txt at kernel source near you.
//Peter
----- Original Message ----
From: Peter Stuge peter@stuge.se To: Coreboot coreboot@coreboot.org Sent: Saturday, November 8, 2008 11:24:08 PM Subject: Re: [coreboot] Max pci bus number?
ron minnich wrote:
How can I find the maximum PCI bus number of the system?
we can define the set of things that seabios needs to know and pass them on from coreboot.
Personally, I would prefer textual attribute-value pairs, since binary structs have a lot of problems (version, etc. etc.)
How about device tree?
Again, check out /usr/src/linux/Documentation/powerpc/booting-without-of.txt at kernel source near you.
Either get it from the device tree if it is still available or do the scan yourself. Note that you should use the numbers you find already set in the bridges. Don't just increment a count as you find bridges. Marc
Kevin, how would you feel about it if we handed the device tree off to you? Just wondering.
Here are our choices.
1. ACPI 2. device tree 3. OFW tree.
I guess we need to solve this now anyway, other payloads will be able to use it.
How much time does your max bus detect add to boot time?
ron
On Sun, Nov 09, 2008 at 01:18:50PM -0800, ron minnich wrote:
Kevin, how would you feel about it if we handed the device tree off to you? Just wondering.
Here are our choices.
- ACPI
Well, the OS needs ACPI, but I'm defnitiely not going to parse a DSDT in SeaBIOS.
- device tree
- OFW tree.
I'm not that familiar with them. My preference would be something very simple, like key/value pairs. I don't object to a heirarchical storage if it's simple though.
I guess we need to solve this now anyway, other payloads will be able to use it.
How much time does your max bus detect add to boot time?
That's a good question. I don't have a reliable way of measuring times. I don't perceive a slowdown, but it's hard to tell because epia-cn is a bit quirky right now -- coreboot seems to reboot like three or four times before launching SeaBIOS.
-Kevin
ron minnich wrote:
- device tree
- OFW tree.
I like the device tree. It's the idea we had in Hamburg..
Kevin O'Connor wrote:
- device tree
- OFW tree.
I'm not that familiar with them. My preference would be something very simple, like key/value pairs. I don't object to a heirarchical storage if it's simple though.
That is pretty much a description of the device tree. Please have a look in Linux sources (the newer the better) at the file Documentation/powerpc/booting-without-of.txt, which describes the device tree in detail.
We don't do all of that yet even in v3, but I think we should.
epia-cn is a bit quirky right now -- coreboot seems to reboot like three or four times before launching SeaBIOS.
Hm! I don't think I've seen that..
//Peter
On 09.11.2008, at 03:52, Kevin O'Connor kevin@koconnor.net wrote:
How can I find the maximum PCI bus number of the system?
The PCI bios calls need to be able to return this information. It also helps when scanning for pci devices, because then we don't have to check for all 256 possible buses.
Right now, SeaBIOS has a compile time definition for the max, but that is awkward and it can lead to hard to debug failures.
Ideas?
Yes, look at coreinfo. The idea is to start at bus 0 and whenever you see a bridge, iterate over it's secondary bus. This way you get all devices but never scan a single bus too much.
-Kevin
-- coreboot mailing list: coreboot@coreboot.org http://www.coreboot.org/mailman/listinfo/coreboot
On Sun, Nov 09, 2008 at 12:03:38PM +0100, Stefan Reinauer wrote:
On 09.11.2008, at 03:52, Kevin O'Connor kevin@koconnor.net wrote:
Right now, SeaBIOS has a compile time definition for the max, but that is awkward and it can lead to hard to debug failures.
Ideas?
Yes, look at coreinfo. The idea is to start at bus 0 and whenever you see a bridge, iterate over it's secondary bus. This way you get all devices but never scan a single bus too much.
Thanks for the hint. I've added max bus detection to the latest SeaBIOS git.
-Kevin