diff mbox series

[U-Boot,067/126] x86: Panic when SPL or TPL fail

Message ID 20190925145750.200592-68-sjg@chromium.org
State Accepted
Commit 3d95688c85aa26dea5d98e277d724aff571a1b4e
Delegated to: Bin Meng
Headers show
Series x86: Add initial support for apollolake | expand

Commit Message

Simon Glass Sept. 25, 2019, 2:56 p.m. UTC
At present when these fail to boot there is no message, just a hang. Add a
panic so it is obvious that something when wrong.

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

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

Comments

Bin Meng Oct. 9, 2019, 2:02 p.m. UTC | #1
On Wed, Sep 25, 2019 at 10:58 PM Simon Glass <sjg@chromium.org> wrote:
>
> At present when these fail to boot there is no message, just a hang. Add a
> panic so it is obvious that something when wrong.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
> ---
>
>  arch/x86/lib/spl.c | 2 +-
>  arch/x86/lib/tpl.c | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
>

Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Bin Meng Oct. 11, 2019, 3:33 a.m. UTC | #2
On Wed, Oct 9, 2019 at 10:02 PM Bin Meng <bmeng.cn@gmail.com> wrote:
>
> On Wed, Sep 25, 2019 at 10:58 PM Simon Glass <sjg@chromium.org> wrote:
> >
> > At present when these fail to boot there is no message, just a hang. Add a
> > panic so it is obvious that something when wrong.
> >
> > Signed-off-by: Simon Glass <sjg@chromium.org>
> > ---
> >
> >  arch/x86/lib/spl.c | 2 +-
> >  arch/x86/lib/tpl.c | 2 +-
> >  2 files changed, 2 insertions(+), 2 deletions(-)
> >
>
> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>

applied to u-boot-x86, thanks!
diff mbox series

Patch

diff --git a/arch/x86/lib/spl.c b/arch/x86/lib/spl.c
index db1ce67a590..e1e2d4fa0d5 100644
--- a/arch/x86/lib/spl.c
+++ b/arch/x86/lib/spl.c
@@ -153,7 +153,7 @@  void board_init_f(ulong flags)
 	ret = x86_spl_init();
 	if (ret) {
 		debug("Error %d\n", ret);
-		hang();
+		panic("x86_spl_init fail");
 	}
 #ifdef CONFIG_TPL
 	gd->bd = malloc(sizeof(*gd->bd));
diff --git a/arch/x86/lib/tpl.c b/arch/x86/lib/tpl.c
index cfefa78045e..d70f590541c 100644
--- a/arch/x86/lib/tpl.c
+++ b/arch/x86/lib/tpl.c
@@ -55,7 +55,7 @@  void board_init_f(ulong flags)
 	ret = x86_tpl_init();
 	if (ret) {
 		debug("Error %d\n", ret);
-		hang();
+		panic("x86_tpl_init fail");
 	}
 
 	/* Uninit CAR and jump to board_init_f_r() */