mirror of
https://xff.cz/git/u-boot/
synced 2025-09-20 10:02:07 +02:00
riscv: Copy the reserved-memory nodes to final DT
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@wdc.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Tested-by: Bin Meng <bmeng.cn@gmail.com>
This commit is contained in:
@@ -28,8 +28,8 @@ __weak void board_quiesce_devices(void)
|
|||||||
|
|
||||||
int arch_fixup_fdt(void *blob)
|
int arch_fixup_fdt(void *blob)
|
||||||
{
|
{
|
||||||
#ifdef CONFIG_EFI_LOADER
|
|
||||||
int err;
|
int err;
|
||||||
|
#ifdef CONFIG_EFI_LOADER
|
||||||
u32 size;
|
u32 size;
|
||||||
int chosen_offset;
|
int chosen_offset;
|
||||||
|
|
||||||
@@ -50,6 +50,12 @@ int arch_fixup_fdt(void *blob)
|
|||||||
/* Overwrite the boot-hartid as U-Boot is the last stage BL */
|
/* Overwrite the boot-hartid as U-Boot is the last stage BL */
|
||||||
fdt_setprop_u32(blob, chosen_offset, "boot-hartid", gd->arch.boot_hart);
|
fdt_setprop_u32(blob, chosen_offset, "boot-hartid", gd->arch.boot_hart);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* 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;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user