[PATCH v1 2/5] board_init: Use memset_simple() in board_init_f_init_reserve()

Stefan Roese sr at denx.de
Fri Aug 6 15:38:40 CEST 2021


board_init_f_init_reserve() is called very early in the boot process,
before the caches are enabled. Because of this, the optimized memset()
version can't be used here on ARM64. With this patch, the simple memset
version memset_simple() is used here instead.

Signed-off-by: Stefan Roese <sr at denx.de>
---

 common/init/board_init.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/common/init/board_init.c b/common/init/board_init.c
index 0965b96fa3ad..9996aff74373 100644
--- a/common/init/board_init.c
+++ b/common/init/board_init.c
@@ -140,7 +140,7 @@ void board_init_f_init_reserve(ulong base)
 
 	gd_ptr = (struct global_data *)base;
 	/* zero the area */
-	memset(gd_ptr, '\0', sizeof(*gd));
+	memset_simple(gd_ptr, '\0', sizeof(*gd));
 	/* set GD unless architecture did it already */
 #if !defined(CONFIG_ARM)
 	arch_setup_gd(gd_ptr);
-- 
2.32.0



More information about the U-Boot mailing list