aboutsummaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2023-08-10 10:36:43 -0400
committerTom Rini <trini@konsulko.com>2023-08-10 10:36:43 -0400
commit824f1044227d5e971d5541d8f334bc2dfa22b99f (patch)
tree40dcd7ccb9a4dd2a5421296e1e7bfc921c46315b /common
parentec58228830a1f68e8e65099387cf12c5a91c9e72 (diff)
parent47ed15125cccd98e041cdff3b6bbe675a2418ec2 (diff)
Merge https://source.denx.de/u-boot/custodians/u-boot-riscv
+ Add USB host support on VisionFive2 board + Enable SPI flash support on VisionFive2 board + Enable Random Number Generator in RISC-V QEMU board + Display new SBI extension + Add SPL_ZERO_MEM_BEFORE_USE Kconfig for jh7110 L2 LIM (Loosely-Integrated Memory)
Diffstat (limited to 'common')
-rw-r--r--common/init/board_init.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/common/init/board_init.c b/common/init/board_init.c
index 96ffb79a98..ab8c508ad8 100644
--- a/common/init/board_init.c
+++ b/common/init/board_init.c
@@ -162,6 +162,9 @@ void board_init_f_init_reserve(ulong base)
#if CONFIG_VAL(SYS_MALLOC_F_LEN)
/* go down one 'early malloc arena' */
gd->malloc_base = base;
+#if CONFIG_IS_ENABLED(ZERO_MEM_BEFORE_USE)
+ memset((void *)base, '\0', CONFIG_VAL(SYS_MALLOC_F_LEN));
+#endif
#endif
if (CONFIG_IS_ENABLED(SYS_REPORT_STACK_F_USAGE))