audk/ArmVirtPkg
Nicolas Ojeda Leon 2b1a5b8c61 Ovmf/HardwareInfoLib: Create Pei lib to parse directly from fw-cfg
Define the HardwareInfoLib API and create the PeiHardwareInfoLib
which implements it, specifically for Pei usage, supporting
only static accesses to parse data directly from a fw-cfg file.
All list-like APIs are implemented as unsupported and only a
fw-cfg wrapper to read hardware info elements is provided.

The Hardware Info library is intended to describe non-discoverable
hardware information and share that from the host to the guest in Ovmf
platforms. The QEMU fw-cfg extension for this library provides a first
variation to parse hardware info by reading it directly from a fw-cfg
file. This library offers a wrapper function to the plain
QmeuFwCfgReadBytes which, specifically, parses header-data pairs out
of the binary values in the file. For this purpose, the approach is
incremental, reading the file block by block and outputting the values
only for a specific known hardware type (e.g. PCI host bridges). One
element is returned in each call until the end of the file is reached.

Considering fw-cfg as the first means to transport hardware info from
the host to the guest, this wrapping library offers the possibility
to statically, and in steps, read a specific type of hardware info
elements out of the file. This method reads one hardware element of a
specific type at a time, without the need to pre-allocate memory and
read the whole file or dynamically allocate memory for each new
element found.

As a usage example, the static approach followed by this library
enables early UEFI stages to use and read hardware information
supplied by the host. For instance, in early times of the PEI stage,
hardware information can be parsed out from a fw-cfg file prescinding
from memory services, that may not yet be available, and avoiding
dynamic memory allocations.

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
..
CloudHvAcpiPlatformDxe ArmVirtPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
CloudHvPlatformHasAcpiDtDxe ArmVirtPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
Include ArmVirtPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
KvmtoolCfgMgrDxe ArmVirtPkg/Kvmtool: Add Configuration Manager 2022-02-01 17:39:34 +00:00
KvmtoolPlatformDxe ArmVirtPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
Library ArmVirtPkg/ArmVirtMemoryInitPeiLib: avoid redundant cache invalidation 2022-02-25 15:57:11 +00:00
PlatformCI ArmVirtPkg/.azurepipelines: Enable EDK II CI for stable/* branches 2020-12-22 22:11:48 +00:00
PlatformHasAcpiDtDxe ArmVirtPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
PrePi ArmVirtPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
XenAcpiPlatformDxe ArmVirtPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
XenPlatformHasAcpiDtDxe ArmVirtPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
XenioFdtDxe ArmVirtPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
ArmVirt.dsc.inc ArmVirtPkg/ArmVirt.dsc.inc: Add VariableFlashInfoLib 2022-05-19 06:11:20 +00:00
ArmVirtCloudHv.dsc ArmVirtPkg/VirtioFdtDxe: Relocate VirtioFdtDxe to OvmfPkg/Fdt 2021-10-14 06:25:52 +00:00
ArmVirtCloudHv.fdf ArmVirtPkg/VirtioFdtDxe: Relocate VirtioFdtDxe to OvmfPkg/Fdt 2021-10-14 06:25:52 +00:00
ArmVirtKvmTool.dsc ArmVirtPkg/ArmVirtKvmTool: wire up configurable timeout 2022-02-25 15:57:11 +00:00
ArmVirtKvmTool.fdf ArmVirtPkg/Kvmtool: Enable ACPI support 2022-02-01 17:39:34 +00:00
ArmVirtPkg.ci.yaml ArmVirtPkg: Add cspell exceptions 2022-02-01 17:39:34 +00:00
ArmVirtPkg.dec ArmVirtPkg/FdtClintDxe: Move FdtClientDxe to EmbeddedPkg 2021-10-14 06:25:52 +00:00
ArmVirtQemu.dsc Ovmf/HardwareInfoLib: Create Pei lib to parse directly from fw-cfg 2022-06-22 15:34:16 +00:00
ArmVirtQemu.fdf ArmVirtPkg/ArmVirtQemu: enable TPM2 support in the PEI phase 2020-03-04 08:48:09 +00:00
ArmVirtQemuFvMain.fdf.inc OvmfPkg: Generalize AcpiPlatformDxe 2021-12-11 14:26:05 +00:00
ArmVirtQemuKernel.dsc ArmVirtPkg: clear PcdConOut{Row,Column} 2022-04-22 18:37:48 +00:00
ArmVirtQemuKernel.fdf ArmVirtPkg: add FDF rule for self-relocating PrePi 2020-06-12 22:17:46 +00:00
ArmVirtRules.fdf.inc ArmVirtPkg: add FDF rule for self-relocating PrePi 2020-06-12 22:17:46 +00:00
ArmVirtXen.dsc ArmVirtPkg/FdtClintDxe: Move FdtClientDxe to EmbeddedPkg 2021-10-14 06:25:52 +00:00
ArmVirtXen.fdf ArmVirtPkg/FdtClintDxe: Move FdtClientDxe to EmbeddedPkg 2021-10-14 06:25:52 +00:00
VarStore.fdf.inc ArmVirtPkg: Replace BSD License with BSD+Patent License 2019-04-09 09:10:21 -07:00