[PATCH] platform: generic: Pack the FDT after applying fixups
Samuel Holland
samuel.holland at sifive.com
Tue Jul 22 16:39:20 PDT 2025
This minimizes the size that will be reserved by the OS for the FDT, and
it prevents the FDT buffer from containing uninitialized memory, which
can be important for some simulation platforms and for attestation.
Closes: https://github.com/riscv-software-src/opensbi/issues/388
Signed-off-by: Samuel Holland <samuel.holland at sifive.com>
---
platform/generic/platform.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/platform/generic/platform.c b/platform/generic/platform.c
index 47e771ad..889d6905 100644
--- a/platform/generic/platform.c
+++ b/platform/generic/platform.c
@@ -245,6 +245,8 @@ int generic_final_init(bool cold_boot)
fdt_fixups(fdt);
fdt_domain_fixup(fdt);
+ fdt_pack(fdt);
+
return 0;
}
--
2.47.2
base-commit: cc546e1a06930c5ebaf6e90a9a28dca4218f1954
branch: up/fdt-pack
More information about the opensbi
mailing list