Message ID | 20200317211946.28062-6-atish.patra@wdc.com |
---|---|
State | New |
Headers | show |
Series | DT related fixes for RISC-V UEFI | expand |
On Wed, Mar 18, 2020 at 5:19 AM Atish Patra <atish.patra at wdc.com> wrote: > > The DT used by U-Boot may be different from the DT being passed to > the OS if the DT is loaded from external media such as network or > mmc. In that case, the reserved-memory node needs to be copied to > the DT passed to the OS. > > Signed-off-by: Atish Patra <atish.patra at wdc.com> > --- > arch/riscv/lib/bootm.c | 5 +++++ > 1 file changed, 5 insertions(+) > Reviewed-by: Bin Meng <bmeng.cn at gmail.com>
diff --git a/arch/riscv/lib/bootm.c b/arch/riscv/lib/bootm.c index 5e907e96701c..1ca8370849a0 100644 --- a/arch/riscv/lib/bootm.c +++ b/arch/riscv/lib/bootm.c @@ -118,6 +118,11 @@ int arch_fixup_fdt(void *blob) fdt_setprop_u32(blob, chosen_offset, "boot-hartid", gd->arch.boot_hart); + /* Copy the reserved-memory node to the DT used by OS */ + err = riscv_fdt_copy_resv_mem_node(gd->fdt_blob, blob); + if (err < 0) + return err; + return 0; }
The DT used by U-Boot may be different from the DT being passed to the OS if the DT is loaded from external media such as network or mmc. In that case, the reserved-memory node needs to be copied to the DT passed to the OS. Signed-off-by: Atish Patra <atish.patra at wdc.com> --- arch/riscv/lib/bootm.c | 5 +++++ 1 file changed, 5 insertions(+)