x86: Panic when SPL or TPL fail
authorSimon Glass <sjg@chromium.org>
Wed, 25 Sep 2019 14:56:51 +0000 (08:56 -0600)
committerBin Meng <bmeng.cn@gmail.com>
Fri, 11 Oct 2019 08:45:05 +0000 (16:45 +0800)
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>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
arch/x86/lib/spl.c
arch/x86/lib/tpl.c

index 2baac91383763391c66daa927ecb21d58744f602..7623fc9ada0777d585f25d6e2d2f7842a304b93a 100644 (file)
@@ -113,7 +113,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));
index cfefa78045e37120d9e42f121ee63a8d6bc95c13..d70f590541c68bf03efad8d9e17b4ef66d4fee20 100644 (file)
@@ -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() */