[SeaBIOS] [PATCH 11/12] Migrate 64bit entries to 64bit pci regions
kevin at koconnor.net
Thu Apr 26 14:45:48 CEST 2012
On Wed, Apr 25, 2012 at 05:29:04PM +0200, Gerd Hoffmann wrote:
> Issue #1: seabios can't boot from a virtio-scsi disk if the controller
> is behind a pci bridge. I think the reason simply is that (according to
> the seabios log) only root bus pci devices are initialized. Probably
> even isn't related to this patch set, just trapped into this while
> testing the bridge mapping code of the patch series.
Is this just a matter of removing the "if (pci_bdf_to_bus(pci->bdf) !=
0) break" from pci_bios_init_devices()?
The code should probably handle the irq swizzling that pci bridges do
> Issue #2: root bus (non-pref) memory regions are mapped above 4G if they
> are 64bit capable. That happened to include the xhci usb controller. I
> don't think we want that. Some day seabios will get xhci support, and
> having the bar above 4G makes it unreachable in 32bit mode. So this
> needs some refinement. Options I can think of:
> (1) Don't bother mapping non-prefmem bars above 4G.
> (2) Only map them above 4G if they are larger than a certain limit.
> (3) Allow devices to be excluded on certain conditions, for example
> when seabios has a driver, when they have an option rom, when
> they have a specific pci id, ...
I'd vote for 2. There's nearly 500MB of space for PCI devices under
4G - small regions (say under 1MB) are unlikely to be the cause of an
allocation failure (1MB would be .2% of total space).
More information about the SeaBIOS