efi: Make FDT extra space configurable
authorPawel Kochanowski <pkochanowski@sii.pl>
Tue, 18 Mar 2025 09:22:18 +0000 (10:22 +0100)
committerHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Fri, 11 Apr 2025 11:20:37 +0000 (13:20 +0200)
commite8660b23f4929fc787e917f3b5f9cd1d09b93e84
tree5c32bfd247719c851e2511d1c68d89a0b683cf8d
parent7b269a2bd64aae7fe51f03f8e0b7d50cc9a2faee
efi: Make FDT extra space configurable

U-Boot currently reserves only 0x3000 bytes when copying the FDT
in copy_fdt(), which may not be sufficient if additional nodes
(such as FMAN firmware) are added later.

This patch uses the exisitng SYS_FDT_PAD to reserve space for FDT fixup
instead of hardcoded value.

This change prevents potential corruption when resizing FDT after
EFI boot, especially when firmware like FMAN requires additional
space.

Signed-off-by: Gabriel Nesteruk <gnesteruk@sii.pl>
Signed-off-by: Pawel Kochanowski <pkochanowski@sii.pl>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
lib/efi_loader/efi_dt_fixup.c
lib/efi_loader/efi_helper.c