ArmVirtPkg: fix boot under Xen

When booting under Xen/Arm64 with a flattened devicetree, XenioFdtDxe.c
performs a runtime assert on the size of the hypervisor node. At some
point the hypervisor devicetree node changed size in upstream Xen, which
makes booting under Xen impossible because the assertion fails:

  ASSERT [XenioFdtDxe] XenioFdtDxe.c(64): RegSize == 2 * sizeof (UINT64)

By putting a debug print in InitializeXenioFdtDxe we can see the value
of RegSize is 48, instead of 2 * sizeof (UINT64)=16.

Change the equality check to equal or greater than (>=).

Signed-off-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
This commit is contained in:
Manos Pitsidianakis
2025-05-29 15:12:11 +03:00
committed by mergify[bot]
parent 0321f030ea
commit 60e54e9211

View File

@@ -56,7 +56,7 @@ InitializeXenioFdtDxe (
ASSERT (AddressCells == 2);
ASSERT (SizeCells == 2);
ASSERT (RegSize == 2 * sizeof (UINT64));
ASSERT (RegSize >= 2 * sizeof (UINT64));
//
// Retrieve the reg base from this node and wire it up to the