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

Zihan Yang posted 2 patches 5 years, 7 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/seabios tags/patchew/1533177555-19114-1-git-send-email-whois.zihan.yang@gmail.com
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(-)
[SeaBIOS] [RFC 0/2] (Ongoing)Support multiple pci domains in pci_device
Posted by Zihan Yang 5 years, 7 months ago
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


_______________________________________________
SeaBIOS mailing list
SeaBIOS@seabios.org
https://mail.coreboot.org/mailman/listinfo/seabios
Re: [SeaBIOS] [RFC 0/2] (Ongoing)Support multiple pci domains in pci_device
Posted by Kevin O'Connor 5 years, 7 months ago
On Thu, Aug 02, 2018 at 10:39:13AM +0800, Zihan Yang wrote:
> 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.

Thanks.  I understand the desire to support multiple PCI domains in
QEMU and the guest OS.  However, what is the high level reason for
wanting the BIOS to be able to interact with the secondary PCI
domains?

-Kevin

_______________________________________________
SeaBIOS mailing list
SeaBIOS@seabios.org
https://mail.coreboot.org/mailman/listinfo/seabios