[U-Boot] [PATCH 29/38] x86: spl: Use hang() instead of a while() loop

Simon Glass sjg at chromium.org
Mon Aug 26 15:59:34 UTC 2019


Use the standard hang() function when booting fails since this implements
the defined U-Boot behaviour for this situation.

Signed-off-by: Simon Glass <sjg at chromium.org>
---

 arch/x86/lib/spl.c | 3 +--
 arch/x86/lib/tpl.c | 3 +--
 2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/arch/x86/lib/spl.c b/arch/x86/lib/spl.c
index 5d5d1a9ca7..01a96d294b 100644
--- a/arch/x86/lib/spl.c
+++ b/arch/x86/lib/spl.c
@@ -183,8 +183,7 @@ void __noreturn jump_to_image_no_args(struct spl_image_info *spl_image)
 	printf("Jumping to 64-bit U-Boot: Note many features are missing\n");
 	ret = cpu_jump_to_64bit_uboot(spl_image->entry_point);
 	debug("ret=%d\n", ret);
-	while (1)
-		;
+	hang();
 }
 #endif
 
diff --git a/arch/x86/lib/tpl.c b/arch/x86/lib/tpl.c
index 492a2d6521..3e662a8bda 100644
--- a/arch/x86/lib/tpl.c
+++ b/arch/x86/lib/tpl.c
@@ -108,8 +108,7 @@ void __noreturn jump_to_image_no_args(struct spl_image_info *spl_image)
 {
 	printf("Jumping to U-Boot SPL at %lx\n", (ulong)spl_image->entry_point);
 	jump_to_spl(spl_image->entry_point);
-	while (1)
-		;
+	hang();
 }
 
 void spl_board_init(void)
-- 
2.23.0.187.g17f5b7556c-goog



More information about the U-Boot mailing list