Skip to content

Commit 45b4eba

Browse files
committed
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. Switch both x64 and aarch64 builds from DEBUG to RELEASE where the assert is compiled out. 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 Signed-off-by: Saravanan D <saravanand@crusoe.ai>
1 parent 13b4963 commit 45b4eba

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

.github/workflows/release.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,13 @@ jobs:
2727
run: |
2828
source edksetup.sh
2929
make -C BaseTools
30-
OvmfPkg/build.sh -p OvmfPkg/CloudHv/CloudHvX64.dsc -a X64 -b DEBUG
30+
OvmfPkg/build.sh -p OvmfPkg/CloudHv/CloudHvX64.dsc -a X64 -b RELEASE
3131
- name: Upload x86-64 artifact
3232
if: github.event_name == 'create' && github.event.ref_type == 'tag'
3333
uses: actions/upload-artifact@v4
3434
with:
3535
name: cloudhv-x64
36-
path: Build/CloudHvX64/DEBUG_GCC/FV/CLOUDHV.fd
36+
path: Build/CloudHvX64/RELEASE_GCC/FV/CLOUDHV.fd
3737

3838
build-aarch64:
3939
name: Build AArch64
@@ -52,14 +52,14 @@ jobs:
5252
source edksetup.sh
5353
make -C BaseTools
5454
export GCC_AARCH64_PREFIX=aarch64-linux-gnu-
55-
build -p ArmVirtPkg/ArmVirtCloudHv.dsc -a AARCH64 -t GCC -b DEBUG \
55+
build -p ArmVirtPkg/ArmVirtCloudHv.dsc -a AARCH64 -t GCC -b RELEASE \
5656
--pcd gEfiMdeModulePkgTokenSpaceGuid.PcdDxeNxMemoryProtectionPolicy=0xC000000000007FD1
5757
- name: Upload AArch64 artifact
5858
if: github.event_name == 'create' && github.event.ref_type == 'tag'
5959
uses: actions/upload-artifact@v4
6060
with:
6161
name: cloudhv-aarch64
62-
path: Build/ArmVirtCloudHv-AARCH64/DEBUG_GCC/FV/CLOUDHV_EFI.fd
62+
path: Build/ArmVirtCloudHv-AARCH64/RELEASE_GCC/FV/CLOUDHV_EFI.fd
6363

6464
release:
6565
name: Release

0 commit comments

Comments
 (0)