x86: ivybridge: Check BIST value on boot
authorSimon Glass <sjg@chromium.org>
Thu, 13 Nov 2014 05:42:20 +0000 (22:42 -0700)
committerSimon Glass <sjg@chromium.org>
Fri, 21 Nov 2014 06:34:14 +0000 (07:34 +0100)
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>
arch/x86/cpu/ivybridge/cpu.c

index ab708dd776e80ef6eb0bb73a43381812a0537edc..6a242d7c8bfe857ceca25d189b5d7638939f55e9 100644 (file)
@@ -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);