[SeaBIOS] [RFC 0/2] (Ongoing)Support multiple pci domains in pci_device

Zihan Yang whois.zihan.yang at gmail.com
Thu Aug 2 04:39:13 CEST 2018


NOTE: This patch set is still ongoing and does not fully function
as its goal. But it involves some API changes, therefore I post them for
comments before moving on to make sure I'm on the right path.

The corresponding qemu part can be found at
https://gitlab.com/WhoisZihan/qemu-pci-domain/tree/master/qemu
I will submit it to qemu list later.

Currently seabios assumes there is only one pci domain(0), and almost
everything operates on pci domain 0 by default. This patch aims to add
multiple pci domain support for pci_device, while reserve the original
API for compatibility.

Some part of it is dirty and hardcoded, as I plan to make it support 2 pci
domains first as a working POC. Many works remain to do when BIOS checks
and initializes PCI devices, because almost everywhere assumes 1 pci domain
by default.

It compiles and runs, but the guest will issue a "Bus 0001:00 not in PCI
Namespace" warning, and it does not correctly recognize the bus under
host bridges other than q35. If you have any clue about this error, please
point me out, I will appreciate it.

Zihan Yang (2):
  fw/pciinit: Recognize pxb-pcie-dev device
  pci_device: Add pci domain support

 src/fw/coreboot.c  |   2 +-
 src/fw/csm.c       |   2 +-
 src/fw/paravirt.c  |   3 +-
 src/fw/pciinit.c   | 208 ++++++++++++++++++++++++++++++++++-------------------
 src/hw/pci.c       |  69 +++++++++---------
 src/hw/pci.h       |  42 +++++++----
 src/hw/pci_ids.h   |   6 +-
 src/hw/pcidevice.c |   8 ++-
 src/hw/pcidevice.h |  10 ++-
 9 files changed, 223 insertions(+), 127 deletions(-)

-- 
2.7.4




More information about the SeaBIOS mailing list