[PATCHv7 1/3] boot_fdt_add_mem_rsv_regions: free old dtb reservations

Simon Glass sjg at chromium.org
Wed May 13 18:26:59 CEST 2026


Hi Randolph,

On 2026-05-13T01:56:06, Randolph Sapp <rs at ti.com> wrote:
> boot_fdt_add_mem_rsv_regions: free old dtb reservations
>
> Add a free flag and an initial call to free allocations covered by the
> global FDT. This assumes that all calls to boot_fdt_add_mem_rsv_regions
> occur before the transition to the new device tree, thus we can access
> the currently active device tree through the global data pointer.
>
> This allows us to clearly indicate to the user when a device tree
> reservation fails. How we handle this can still use some improvement.
> Right now we'll keep the default behavior and try to boot anyway.
>
> This functionality was broken in:
> 5a6aa7d ("boot: fdt: Handle already reserved memory in boot_fdt_reserve_region()")
>
> Signed-off-by: Randolph Sapp <rs at ti.com>
> Acked-by: Ilias Apalodimas <ilias.apalodimas at linaro.org>
>
> boot/image-fdt.c | 77 +++++++++++++++++++++++++++++++++++++++++---------------
>  include/image.h  |  2 +-
>  2 files changed, 58 insertions(+), 21 deletions(-)

Subject prefix should be something like 'boot: fdt:' rather than the
function name. Please also turn the broken-in reference into a proper
Fixes: tag with a 12-char hash:

    Fixes: 5a6aa7d59133 ("boot: fdt: Handle already reserved memory in
boot_fdt_reserve_region()")

Reviewed-by: Simon Glass <sjg at chromium.org>

Regards,
Simon


More information about the U-Boot mailing list