summaryrefslogtreecommitdiff
path: root/arch/x86
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2014-11-12 22:42:20 -0700
committerSimon Glass <sjg@chromium.org>2014-11-21 07:34:14 +0100
commit94060ff278e3ed4d91e4605701231d194a5013a3 (patch)
treebc32859eb9ac1c865050ef190db6208478ddf9a9 /arch/x86
parentf5fbbe95798dba8f1536892598afbf33b5c07b5f (diff)
downloadu-boot-imx-94060ff278e3ed4d91e4605701231d194a5013a3.zip
u-boot-imx-94060ff278e3ed4d91e4605701231d194a5013a3.tar.gz
u-boot-imx-94060ff278e3ed4d91e4605701231d194a5013a3.tar.bz2
x86: ivybridge: Check BIST value on boot
The built-in self test value should be checked before we continue booting. Refuse to continue if there is something wrong. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'arch/x86')
-rw-r--r--arch/x86/cpu/ivybridge/cpu.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/arch/x86/cpu/ivybridge/cpu.c b/arch/x86/cpu/ivybridge/cpu.c
index ab708dd..6a242d7 100644
--- a/arch/x86/cpu/ivybridge/cpu.c
+++ b/arch/x86/cpu/ivybridge/cpu.c
@@ -179,10 +179,26 @@ int arch_cpu_init(void)
return 0;
}
+static int report_bist_failure(void)
+{
+ if (gd->arch.bist != 0) {
+ printf("BIST failed: %08x\n", gd->arch.bist);
+ return -EFAULT;
+ }
+
+ return 0;
+}
+
int print_cpuinfo(void)
{
char processor_name[CPU_MAX_NAME_LEN];
const char *name;
+ int ret;
+
+ /* Halt if there was a built in self test failure */
+ ret = report_bist_failure();
+ if (ret)
+ return ret;
/* Print processor name */
name = cpu_get_name(processor_name);