audk/OvmfPkg/Library
Laszlo Ersek 4fc18df913 OvmfPkg: QemuBootOrderLib: recognize extra PCI root buses
The OFW device path that QEMU exports in the "bootorder" fw_cfg file, for
a device that is plugged into the main PCI root bus, is:

  /pci@i0cf8/...

Whereas the same device plugged into the N'th extra root bus results in:

  /pci@i0cf8,N/pci-bridge@0/...

(N is in hex.)

Extend TranslatePciOfwNodes() so that it not assume a single PCI root;
instead it parse the extra root bus serial number if present, and resolve
it in the translation to the UEFI devpath fragment.

Note that the "pci-bridge@0" node is a characteristic of QEMU's PXB
device. It reflects the actual emulated PCI hierarchy. We don't parse it
specifically in this patch, because it is automatically handled by the
bridge sequence translator added recently in SVN rev 17385 (git commit
feca17fa4b) -- "OvmfPkg: QemuBootOrderLib: parse OFW device path nodes of
PCI bridges".

The macro EXAMINED_OFW_NODES need not be raised from 6. The longest OFW
device paths that we wish to recognize under this new scheme comprise 5
nodes. The initial "extra root bus" OFW fragment, visible at the top,
takes up 2 nodes, after which the longest device-specific patterns (IDE
disk, IDE CD-ROM, ISA floppy, virtio-scsi disk) take 3 more nodes each.

Cc: Jordan Justen <jordan.l.justen@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17965 6f19259b-4bc3-4df7-8a09-765794883524
2015-07-14 12:02:44 +00:00
..
AcpiTimerLib OvmfPkg: extract some bits and port offsets common to Q35 and I440FX 2015-05-13 09:31:53 +00:00
EmuVariableFvbLib
LoadLinuxLib OvmfPkg LoadLinuxLib: Convert X64/JumpToKernel.asm to NASM 2014-10-31 20:54:31 +00:00
LockBoxLib OvmfPkg: implement LockBoxLib 2014-03-04 08:03:23 +00:00
NvVarsFileLib Fix VS2013 build failure. 2014-08-13 06:31:08 +00:00
PlatformBdsLib OvmfPkg: PlatformBdsLib: connect all PCI root buses 2015-07-14 12:01:52 +00:00
PlatformDebugLibIoPort OvmfPkg: Update PlatformBaseDebugLibIoPort library 2015-02-06 06:38:37 +00:00
PlatformFvbLibNull
PlatformSecureLib OvmfPkg: Add custom mode setup if the Secure Boot build option is specified. 2012-04-04 17:35:06 +00:00
QemuBootOrderLib OvmfPkg: QemuBootOrderLib: recognize extra PCI root buses 2015-07-14 12:02:44 +00:00
QemuFwCfgLib OvmfPkg: QemuFwCfgLib: avoid "variable set but not used" warning from GCC 2015-07-10 06:46:57 +00:00
ResetSystemLib OvmfPkg ResetSystemLib: Fix VS build error 2013-08-19 04:15:26 +00:00
SerializeVariablesLib OvmfPkg/SerializeVariablesLib: ignore secure variable restore errors 2013-05-28 17:21:37 +00:00
VirtioLib OvmfPkg/Virtio: Removed VirtioReadDevice() / VirtIoWriteDevice() functions 2013-12-11 16:58:39 +00:00
VirtioMmioDeviceLib OvmfPkg/VirtioMmioDeviceLib: Implement VIRTIO_DEVICE_PROTOCOL for VirtIo Devices over MMIO 2013-12-11 16:57:59 +00:00
XenConsoleSerialPortLib OvmfPkg: XenConsoleSerialPortLib: deal with output overflow 2015-03-27 21:25:16 +00:00
XenHypercallLib OvmfPkg: replace strict XenHypercallLib construction with explicit query 2015-03-03 08:13:40 +00:00
XenIoMmioLib ArmVirtualizationPkg: add XenIoMmioLib 2015-02-28 20:34:16 +00:00