diff mbox

[U-Boot,31/39] x86: ivybridge: Check BIST value on boot

Message ID 1415305231-30180-32-git-send-email-sjg@chromium.org
State Superseded
Delegated to: Simon Glass
Headers show

Commit Message

Simon Glass Nov. 6, 2014, 8:20 p.m. UTC
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 | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

Comments

Bin Meng Nov. 10, 2014, 2:50 a.m. UTC | #1
Hi Simon,

On Fri, Nov 7, 2014 at 4:20 AM, Simon Glass <sjg@chromium.org> wrote:
> 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 | 16 ++++++++++++++++
>  1 file changed, 16 insertions(+)
>
> diff --git a/arch/x86/cpu/ivybridge/cpu.c b/arch/x86/cpu/ivybridge/cpu.c
> index aa825c7..e73ccb7 100644
> --- a/arch/x86/cpu/ivybridge/cpu.c
> +++ b/arch/x86/cpu/ivybridge/cpu.c
> @@ -177,10 +177,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)
>  {

I don't see patch that moves print_cpuinfo() from arch/x86/cpu/cpu.c
to this. Is there anything I missed?

[snip]

Regards,
Bin
Simon Glass Nov. 11, 2014, 12:21 a.m. UTC | #2
Hi Bin,

On 9 November 2014 19:50, Bin Meng <bmeng.cn@gmail.com> wrote:
> Hi Simon,
>
> On Fri, Nov 7, 2014 at 4:20 AM, Simon Glass <sjg@chromium.org> wrote:
>> 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 | 16 ++++++++++++++++
>>  1 file changed, 16 insertions(+)
>>
>> diff --git a/arch/x86/cpu/ivybridge/cpu.c b/arch/x86/cpu/ivybridge/cpu.c
>> index aa825c7..e73ccb7 100644
>> --- a/arch/x86/cpu/ivybridge/cpu.c
>> +++ b/arch/x86/cpu/ivybridge/cpu.c
>> @@ -177,10 +177,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)
>>  {
>
> I don't see patch that moves print_cpuinfo() from arch/x86/cpu/cpu.c
> to this. Is there anything I missed?

You will see it when I resend the series.

Regards,
Simon
diff mbox

Patch

diff --git a/arch/x86/cpu/ivybridge/cpu.c b/arch/x86/cpu/ivybridge/cpu.c
index aa825c7..e73ccb7 100644
--- a/arch/x86/cpu/ivybridge/cpu.c
+++ b/arch/x86/cpu/ivybridge/cpu.c
@@ -177,10 +177,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);