From f72f16ee5076dfcba9b278d2b24dfffc64f9a89a Mon Sep 17 00:00:00 2001 From: Jinank Jain Date: Thu, 8 May 2025 06:32:40 +0000 Subject: [PATCH] arch: Fix incorrect FDT generation Num SPI and Base SPI nodes should be added before the end node to be included in the device tree generation. Fixes: eac44e6 (arch: Extend FDT for GICv2M device for ARM64 on MSHV) Signed-off-by: Jinank Jain --- arch/src/aarch64/fdt.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/src/aarch64/fdt.rs b/arch/src/aarch64/fdt.rs index eb3f3bf34..cb140e6b9 100644 --- a/arch/src/aarch64/fdt.rs +++ b/arch/src/aarch64/fdt.rs @@ -678,12 +678,13 @@ fn create_gic_node(fdt: &mut FdtWriter, gic_device: &Arc>) -> Fd fdt.property_u32("phandle", MSI_PHANDLE)?; let msi_reg_prop = gic_device.lock().unwrap().msi_properties(); fdt.property_array_u64("reg", &msi_reg_prop)?; - fdt.end_node(msic_node)?; if msi_compatibility == GIC_V2M_COMPATIBLE { fdt.property_u32("arm,msi-base-spi", SPI_BASE)?; fdt.property_u32("arm,msi-num-spis", SPI_NUM)?; } + + fdt.end_node(msic_node)?; } fdt.end_node(intc_node)?;