diff options
| author | Samuel Holland <[email protected]> | 2025-07-22 16:39:20 -0700 |
|---|---|---|
| committer | Anup Patel <[email protected]> | 2025-08-28 10:26:25 +0530 |
| commit | bbe9a23060e956d68357adc2740e5df190009a7d (patch) | |
| tree | b985826584c725c7c5c00c66fd5e4d518a29732f | |
| parent | 525ac970b3c2b1549c8747959cfc4f9b84e1f711 (diff) | |
platform: generic: Pack the FDT after applying fixups
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 <[email protected]>
Reviewed-by: Anup Patel <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Anup Patel <[email protected]>
| -rw-r--r-- | platform/generic/platform.c | 2 |
1 files changed, 2 insertions, 0 deletions
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; } |
