diff options
author | Heinrich Schuchardt | 2020-03-24 07:37:52 +0100 |
---|---|---|
committer | Heinrich Schuchardt | 2020-03-28 10:45:03 +0100 |
commit | 4ef2b0d5512857c1af1110a0b23744c00a585cb2 (patch) | |
tree | 9da1fd0a0404e1c6d3cce79ffe4efe7e6a9ba0bc /cmd/bootefi.c | |
parent | 6c0ef35cdc3164fda9c7ddd15db58793b1bd3263 (diff) |
efi_loader: only reserve memory if fdt node enabled
Sub-nodes of /reserved-memory may be disabled. In this case we should not
reserve memory in the memory map.
Reported-by: Patrick DELAUNAY <patrick.delaunay@st.com>
Fixes: fef907b2e440 ("efi_loader: create reservations after
ft_board_setup")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Atish Patra <atish.patra@wdc.com>
Diffstat (limited to 'cmd/bootefi.c')
-rw-r--r-- | cmd/bootefi.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/cmd/bootefi.c b/cmd/bootefi.c index 3bbe2d6a1a4..aaed5755059 100644 --- a/cmd/bootefi.c +++ b/cmd/bootefi.c @@ -199,7 +199,8 @@ static void efi_carve_out_dt_rsv(void *fdt) * The /reserved-memory node may have children with * a size instead of a reg property. */ - if (addr != FDT_ADDR_T_NONE) + if (addr != FDT_ADDR_T_NONE && + fdtdec_get_is_enabled(fdt, subnode)) efi_reserve_memory(addr, size); subnode = fdt_next_subnode(fdt, subnode); } |