Skip to content

ch-1e1b96f126

Latest

Choose a tag to compare

@github-actions github-actions released this 10 Apr 17:45
ci: fix aarch64 firmware crash with multiple PCI segments

The aarch64 UEFI firmware uses FdtPciHostBridgeLib
to discover PCI host bridges from the device tree.
This library asserts that only one pci-host-ecam-
generic FDT node exists. Cloud-hypervisor generates
one node per PCI segment, so when we launch a guest
with num_pci_segments > 1 the DEBUG firmware hits
the assert and terminates. This assert is aarch64
specific since amd64 does not use FDT for PCI
discovery.

FdtPciHostBridgeLib only enumerates the first PCI
host bridge (segment 0) regardless of build type.
Segments 1-95 are not visible to UEFI. This is not
a functional problem because:

  - Cloud-hypervisor provides ACPI tables (MCFG,
    DSDT) describing all segments directly to the
    guest via CloudHvAcpiPlatformDxe
  - The Linux kernel re-enumerates PCI from the
    MCFG table and assigns BARs independently
  - Boot devices (virtio-blk, virtio-net) reside
    on segment 0 which UEFI does enumerate

Switch both amd64 and aarch64 builds from DEBUG to
RELEASE.

Signed-off-by: Saravanan D <saravanand@crusoe.ai>