The patch introduces the CRITICAL feature of POST tests. If the test marked as POST_CRITICAL fails then the alternative, post_critical, boot-command is used. If this command is not defined then U-Boot enters into interactive mode.
Signed-off-by: Dmitry Rakhchev <rda@emcraft.com> Signed-off-by: Yuri Tikhonov <yur@emcraft.com>
This commit is contained in:

committed by
Wolfgang Denk

parent
8f15d4addd
commit
b428f6a8c6
@@ -60,6 +60,7 @@ typedef struct global_data {
|
||||
#define GD_FLG_RELOC 0x00001 /* Code was relocated to RAM */
|
||||
#define GD_FLG_DEVINIT 0x00002 /* Devices have been initialized */
|
||||
#define GD_FLG_SILENT 0x00004 /* Silent mode */
|
||||
#define GD_FLG_POSTFAIL 0x00008 /* Critical POST test failed */
|
||||
|
||||
#define DECLARE_GLOBAL_DATA_PTR register volatile gd_t *gd asm ("r8")
|
||||
|
||||
|
@@ -51,6 +51,7 @@ typedef struct global_data {
|
||||
#define GD_FLG_RELOC 0x00001 /* Code was relocated to RAM */
|
||||
#define GD_FLG_DEVINIT 0x00002 /* Devices have been initialized */
|
||||
#define GD_FLG_SILENT 0x00004 /* Silent mode */
|
||||
#define GD_FLG_POSTFAIL 0x00008 /* Critical POST test failed */
|
||||
|
||||
#define DECLARE_GLOBAL_DATA_PTR register gd_t *gd asm("r5")
|
||||
|
||||
|
@@ -61,6 +61,7 @@ typedef struct global_data {
|
||||
#define GD_FLG_RELOC 0x00001 /* Code was relocated to RAM */
|
||||
#define GD_FLG_DEVINIT 0x00002 /* Devices have been initialized */
|
||||
#define GD_FLG_SILENT 0x00004 /* Silent mode */
|
||||
#define GD_FLG_POSTFAIL 0x00008 /* Critical POST test failed */
|
||||
|
||||
#define DECLARE_GLOBAL_DATA_PTR register gd_t * volatile gd asm ("P5")
|
||||
|
||||
|
@@ -54,6 +54,7 @@ typedef struct {
|
||||
#define GD_FLG_RELOC 0x00001 /* Code was relocated to RAM */
|
||||
#define GD_FLG_DEVINIT 0x00002 /* Devices have been initialized */
|
||||
#define GD_FLG_SILENT 0x00004 /* Silent mode */
|
||||
#define GD_FLG_POSTFAIL 0x00008 /* Critical POST test failed */
|
||||
|
||||
extern gd_t *global_data;
|
||||
|
||||
|
@@ -68,6 +68,7 @@ typedef struct global_data {
|
||||
#define GD_FLG_RELOC 0x00001 /* Code was relocated to RAM */
|
||||
#define GD_FLG_DEVINIT 0x00002 /* Devices have been initialized */
|
||||
#define GD_FLG_SILENT 0x00004 /* Silent mode */
|
||||
#define GD_FLG_POSTFAIL 0x00008 /* Critical POST test failed */
|
||||
|
||||
#if 0
|
||||
extern gd_t *global_data;
|
||||
|
@@ -52,6 +52,7 @@ typedef struct global_data {
|
||||
#define GD_FLG_RELOC 0x00001 /* Code was relocated to RAM */
|
||||
#define GD_FLG_DEVINIT 0x00002 /* Devices have been initialized */
|
||||
#define GD_FLG_SILENT 0x00004 /* Silent mode */
|
||||
#define GD_FLG_POSTFAIL 0x00008 /* Critical POST test failed */
|
||||
|
||||
#define DECLARE_GLOBAL_DATA_PTR register volatile gd_t *gd asm ("r31")
|
||||
|
||||
|
@@ -54,6 +54,7 @@ typedef struct global_data {
|
||||
#define GD_FLG_RELOC 0x00001 /* Code was relocated to RAM */
|
||||
#define GD_FLG_DEVINIT 0x00002 /* Devices have been initialized */
|
||||
#define GD_FLG_SILENT 0x00004 /* Silent mode */
|
||||
#define GD_FLG_POSTFAIL 0x00008 /* Critical POST test failed */
|
||||
|
||||
#define DECLARE_GLOBAL_DATA_PTR register volatile gd_t *gd asm ("k0")
|
||||
|
||||
|
@@ -45,6 +45,7 @@ typedef struct global_data {
|
||||
#define GD_FLG_RELOC 0x00001 /* Code was relocated to RAM */
|
||||
#define GD_FLG_DEVINIT 0x00002 /* Devices have been initialized */
|
||||
#define GD_FLG_SILENT 0x00004 /* Silent mode */
|
||||
#define GD_FLG_POSTFAIL 0x00008 /* Critical POST test failed */
|
||||
|
||||
#define DECLARE_GLOBAL_DATA_PTR register gd_t *gd asm ("%g7")
|
||||
|
||||
|
@@ -44,6 +44,7 @@ typedef struct global_data {
|
||||
#define GD_FLG_RELOC 0x00001 /* Code was relocated to RAM */
|
||||
#define GD_FLG_DEVINIT 0x00002 /* Devices have been initialized */
|
||||
#define GD_FLG_SILENT 0x00004 /* Silent mode */
|
||||
#define GD_FLG_POSTFAIL 0x00008 /* Critical POST test failed */
|
||||
|
||||
#define DECLARE_GLOBAL_DATA_PTR register gd_t *gd asm ("r15")
|
||||
|
||||
|
@@ -164,6 +164,7 @@ typedef struct global_data {
|
||||
#define GD_FLG_RELOC 0x00001 /* Code was relocated to RAM */
|
||||
#define GD_FLG_DEVINIT 0x00002 /* Devices have been initialized */
|
||||
#define GD_FLG_SILENT 0x00004 /* Silent mode */
|
||||
#define GD_FLG_POSTFAIL 0x00008 /* Critical POST test failed */
|
||||
|
||||
#if 1
|
||||
#define DECLARE_GLOBAL_DATA_PTR register volatile gd_t *gd asm ("r2")
|
||||
|
@@ -44,6 +44,7 @@ typedef struct global_data
|
||||
#define GD_FLG_RELOC 0x00001 /* Code was relocated to RAM */
|
||||
#define GD_FLG_DEVINIT 0x00002 /* Devices have been initialized */
|
||||
#define GD_FLG_SILENT 0x00004 /* Silent mode */
|
||||
#define GD_FLG_POSTFAIL 0x00008 /* Critical POST test failed */
|
||||
|
||||
#define DECLARE_GLOBAL_DATA_PTR register gd_t *gd asm ("r13")
|
||||
|
||||
|
@@ -42,12 +42,16 @@
|
||||
#define POST_REBOOT 0x0800 /* test may cause rebooting */
|
||||
#define POST_PREREL 0x1000 /* test runs before relocation */
|
||||
|
||||
#define POST_CRITICAL 0x2000 /* Use failbootcmd if test failed */
|
||||
|
||||
#define POST_MEM (POST_RAM | POST_ROM)
|
||||
#define POST_ALWAYS (POST_NORMAL | \
|
||||
POST_SLOWTEST | \
|
||||
POST_MANUAL | \
|
||||
POST_POWERON )
|
||||
|
||||
#define POST_FAIL_SAVE 0x80
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
|
||||
struct post_test {
|
||||
|
Reference in New Issue
Block a user