[SeaBIOS] [RFC v2 0/3] Support multiple pci domains in pci_device

Zihan Yang whois.zihan.yang at gmail.com
Thu Aug 9 07:43:51 CEST 2018


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.

The reason to get seabios involved is that the pxb-pcie host bus created
in QEMU is now in a different PCI domain, and its bus number would start
from 0 instead of bus_nr. Actually bus_nr should not be used when in
another non-zero domain. However, QEMU only binds port 0xcf8 and 0xcfc to
bus pcie.0. To avoid bus confliction, we should use other port pairs for
busses under new domains.

Current issues:
* when trying to read config space of pcie_pci_bridge, it actually reads
  out the result of mch. I'm working on this weird behavior.

Changelog:
v2 <- v1:
- Fix bugs in filtering domains when traversing pci devices
- Reformat some hardcoded codes, such as probing the pci device in pci_setup

Zihan Yang (3):
  fw/pciinit: Recognize pxb-pcie-dev device
  pci_device: Add pci domain support
  pci: filter undesired domain when traversing pci

 src/fw/coreboot.c    |   2 +-
 src/fw/csm.c         |   2 +-
 src/fw/mptable.c     |   1 +
 src/fw/paravirt.c    |   3 +-
 src/fw/pciinit.c     | 276 ++++++++++++++++++++++++++++++---------------------
 src/hw/ahci.c        |   1 +
 src/hw/ata.c         |   1 +
 src/hw/esp-scsi.c    |   1 +
 src/hw/lsi-scsi.c    |   1 +
 src/hw/megasas.c     |   1 +
 src/hw/mpt-scsi.c    |   1 +
 src/hw/nvme.c        |   1 +
 src/hw/pci.c         |  69 +++++++------
 src/hw/pci.h         |  42 +++++---
 src/hw/pci_ids.h     |   6 +-
 src/hw/pcidevice.c   |  11 +-
 src/hw/pcidevice.h   |   8 +-
 src/hw/pvscsi.c      |   1 +
 src/hw/sdcard.c      |   1 +
 src/hw/usb-ehci.c    |   1 +
 src/hw/usb-ohci.c    |   1 +
 src/hw/usb-uhci.c    |   1 +
 src/hw/usb-xhci.c    |   1 +
 src/hw/virtio-blk.c  |   1 +
 src/hw/virtio-scsi.c |   1 +
 src/optionroms.c     |   3 +
 26 files changed, 268 insertions(+), 170 deletions(-)

-- 
2.7.4




More information about the SeaBIOS mailing list