ci: fix aarch64 firmware crash with multiple PCI segments#10
Open
saravan2 wants to merge 1 commit intocloud-hypervisor:chfrom
Open
ci: fix aarch64 firmware crash with multiple PCI segments#10saravan2 wants to merge 1 commit intocloud-hypervisor:chfrom
saravan2 wants to merge 1 commit intocloud-hypervisor:chfrom
Conversation
Member
Author
|
I did not see any benefit for continuing with debug build for amd64 firmware. I switched to When this PR gets merged, we would have to trigger a new release. |
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
Switch both amd64 and aarch64 builds from DEBUG to RELEASE.
Before
ARM64 integration test failure
The
CLOUDHV_EFI.fdfromch-13b4963ec4release hangs during boot specifically when--platform num_pci_segments=96is set.Validation
Produced aarch64 firmware on my fork : https://github.com/saravan2/edk2/releases/tag/release-build