From: Simon Glass Date: Thu, 13 Nov 2014 05:42:20 +0000 (-0700) Subject: x86: ivybridge: Check BIST value on boot X-Git-Tag: v2015.01-rc2~5^2~9 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=94060ff278e3ed4d91e4605701231d194a5013a3;p=oweals%2Fu-boot.git 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 --- diff --git a/arch/x86/cpu/ivybridge/cpu.c b/arch/x86/cpu/ivybridge/cpu.c index ab708dd776..6a242d7c8b 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);