audk/OvmfPkg/Library
Nicolas Ojeda Leon 6c9f218bc0 OvmfPkg/Library: Create base HardwareInfoLib for PCI Host Bridges
Create the Hardware Info library base together with the specifics to
describe PCI Host Bridges.

The Hardware Info library is intended to be used for disclosing
non-discoverable hardware information from the host to the guest in
Ovmf platforms. Core functionality will provide the possibility to
parse information from a generic BLOB into runtime structures. The
library is conceived in a generic way so that further hardware
elements can also be described using it. For such purpose the length
of the BLOB is not restricted but instead regarded as a sequence of
header-info elements that allow the parsing during runtime. The first
type of hardware defined will be PCI host bridges, providing the
possibility to define multiple and specify the resources each of them
can use. This enables the guest firmware to configure PCI resources
properly. Having the size of each individual element favors the reuse
of a single interface to convey descriptions of an arbitrary number
of heterogenous hardware elements. Furthermore, flexible access
mechanisms coupled with the size will grant the possibility of
interpreting them in a single run.

Define the base types of the generic Hardware Info library to parse
heterogeneous data. Also provide the specific changes to support
PCI host bridges as the first hardware type supported by the
library.
Additionally, define the HOST_BRIDGE_INFO structure to describe PCI
host bridges along with the functionality to parse such information
into proper structures used by the PCI driver in a centralized manner
and taking care of versioning.

As an example and motivation, the library will be used to define
multiple PCI host bridges for complex platforms that require it.
The first means of transportation that will be used is going to be
fw-cfg, over which a stream of bytes will be transferred and later
parsed by the hardware info library. Accordingly, the PCI driver
will make use of these host bridges definitions to populate the
list of Root Bridges and proceed with the configuration and discovery
of underlying hardware components.

As mentioned before, the binary data to be parsed by the Hardware
Info library should be organized as a sequence of Header-element
pairs in which the header describes the type and size of the associated
element that comes right after it. As an illustration, to provide
inforation of 3 host bridges the data, conceptually, would look
like this:

Header PCI Host Bridge (type and size) # 1
PCI Host Bridge info # 1
Header PCI Host Bridge (type and size) # 2
PCI Host Bridge info # 2
Header PCI Host Bridge (type and size) # 3
PCI Host Bridge info # 3

Cc: Alexander Graf <graf@amazon.de>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Nicolas Ojeda Leon <ncoleon@amazon.com>
2022-06-22 15:34:16 +00:00
..
AcpiTimerLib OvmfPkg: Update DxeAcpiTimerLib to read HostBridgeDevId in PlatformInfoHob 2022-04-02 10:09:47 +00:00
BaseCachingPciExpressLib OvmfPkg/BaseCachingPciExpressLib: Migrate BaseCachingPciExpressLib 2022-01-29 17:36:59 +00:00
BaseMemEncryptSevLib OvmfPkg: Replace GUEST_TYPE with CC_GUEST_TYPE 2022-04-19 01:26:08 +00:00
BaseMemEncryptTdxLib OvmfPkg/BaseMemEncryptTdxLib: Add TDX helper library 2022-04-02 08:15:12 +00:00
BasePciCapLib OvmfPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
BasePciCapPciSegmentLib OvmfPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
BhyveFwCtlLib OvmfPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
BlobVerifierLibNull OvmfPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
CcProbeLib OvmfPkg: Add CcProbeLib 2022-04-19 01:26:08 +00:00
DxePciLibI440FxQ35 OvmfPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
EmuVariableFvbLib OvmfPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
GenericQemuLoadImageLib OvmfPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
HardwareInfoLib OvmfPkg/Library: Create base HardwareInfoLib for PCI Host Bridges 2022-06-22 15:34:16 +00:00
LoadLinuxLib OvmfPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
LockBoxLib OvmfPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
MpInitLibDepLib OvmfPkg: Add MpInitLibDepLib 2022-05-11 08:40:53 +00:00
NvVarsFileLib OvmfPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
PciHostBridgeLib OvmfPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
PciHostBridgeLibScan OvmfPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
PciHostBridgeUtilityLib OvmfPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
PeilessStartupLib OvmfPkg: Implement MeasureHobList/MeasureFvImage 2022-06-07 11:05:53 +00:00
PlatformBmPrintScLib OvmfPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
PlatformBootManagerLib OvmfPkg/CloudHv: Connect serial console 2022-01-13 14:54:40 +00:00
PlatformBootManagerLibBhyve OvmfPkg: Call PlatformInitializeConsole for GPU passthrough case 2021-12-17 17:36:14 +00:00
PlatformBootManagerLibGrub OvmfPkg: Call PlatformInitializeConsole for GPU passthrough case 2021-12-17 17:36:14 +00:00
PlatformDebugLibIoPort OvmfPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
PlatformFvbLibNull OvmfPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
PlatformHasIoMmuLib OvmfPkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:19 -07:00
PlatformInitLib OvmfPkg: Don't access A20 gate register on Cloud Hypervisor 2022-06-03 10:51:26 +00:00
PlatformSecureLib OvmfPkg: strip trailing whitespace 2019-10-04 11:18:32 +01:00
PxeBcPcdProducerLib OvmfPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
QemuBootOrderLib OvmfPkg: Check for QemuFwCfg availability before accessing it 2022-06-03 10:51:26 +00:00
QemuFwCfgLib OvmfPkg: Replace GUEST_TYPE with CC_GUEST_TYPE 2022-04-19 01:26:08 +00:00
QemuFwCfgS3Lib OvmfPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
QemuFwCfgSimpleParserLib OvmfPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
ResetSystemLib OvmfPkg: Handle Cloud Hypervisor host bridge 2021-12-11 14:26:05 +00:00
SerializeVariablesLib OvmfPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
SmbiosVersionLib OvmfPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
SmmCpuFeaturesLib OvmfPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
SmmCpuPlatformHookLibQemu OvmfPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
Tcg2PhysicalPresenceLibNull OvmfPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
Tcg2PhysicalPresenceLibQemu OvmfPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
TdxMailboxLib OvmfPkg: Add TdxMailboxLib 2022-04-02 08:15:12 +00:00
TlsAuthConfigLib OvmfPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
UefiPciCapPciIoLib OvmfPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
VirtioLib OvmfPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
VirtioMmioDeviceLib OvmfPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
VmgExitLib OvmfPkg: Extend VmgExitLib to handle #VE exception 2022-04-02 08:15:12 +00:00
X86QemuLoadImageLib OvmfPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
XenConsoleSerialPortLib OvmfPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
XenHypercallLib OvmfPkg: Remove RVCT support 2022-05-13 14:58:54 +00:00
XenIoMmioLib OvmfPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
XenPlatformLib OvmfPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
XenRealTimeClockLib OvmfPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00