From patchwork Thu Nov 6 20:20:23 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 407716 X-Patchwork-Delegate: sjg@chromium.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 2648814008C for ; Fri, 7 Nov 2014 07:26:49 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id CCCC6A7422; Thu, 6 Nov 2014 21:24:44 +0100 (CET) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id fJ3XrIZZlVev; Thu, 6 Nov 2014 21:24:44 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 1A2FFA7455; Thu, 6 Nov 2014 21:24:01 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 9D3714BA82 for ; Thu, 6 Nov 2014 21:21:33 +0100 (CET) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Xg8GJpSxqX2U for ; Thu, 6 Nov 2014 21:21:33 +0100 (CET) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mail-yh0-f73.google.com (mail-yh0-f73.google.com [209.85.213.73]) by theia.denx.de (Postfix) with ESMTPS id E1E1F4BC19 for ; Thu, 6 Nov 2014 21:21:26 +0100 (CET) Received: by mail-yh0-f73.google.com with SMTP id f10so284824yha.2 for ; Thu, 06 Nov 2014 12:21:24 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=pS/1sYelq2csecvgyc0MowA8UXaSH82Af2JmB+P719Q=; b=RLUU0NehYBsVLVLfhWFpk8p/zeqEEP3yz1W61NReGkEVHA84H9x8ARPBuAIvZHtnA8 X+HlJSsLxOYsNeIvWc8MpLtbLALQtmLA1WwzlN+C6AztQKLq4WETw/m2pXc2H+44ylw1 An65eV5R1NjFErHCSrjf7HYeTA+sNTluBn7CYEz8SINACFW4EjYUPv6VWrEqSYEGjWYs qhUmiPDQBFVaQvAYKNaaNVdol7PEl3+MYp2d1n079vFiN9WTl5pDpJTgkyqB7HNqvZyX TrOAS9WIR3VEDOwtAIuMdzdb8vnfinniTiihyLXzzgee4wSayY32wlTnvUiL12J/rpeA F/Ow== X-Gm-Message-State: ALoCoQlzKCmjrAynw5Br9VeWGbXrNzHlABV+0z66TgxeYPUAcUsuqBvcRXuYgThroNu+pvPBw+QL X-Received: by 10.236.70.70 with SMTP id o46mr5699046yhd.9.1415305284919; Thu, 06 Nov 2014 12:21:24 -0800 (PST) Received: from corpmail-nozzle1-2.hot.corp.google.com ([100.108.1.103]) by gmr-mx.google.com with ESMTPS id n63si270364yho.5.2014.11.06.12.21.24 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 06 Nov 2014 12:21:24 -0800 (PST) Received: from kaki.bld.corp.google.com ([172.29.216.32]) by corpmail-nozzle1-2.hot.corp.google.com with ESMTP id qP9gYgtF.5; Thu, 06 Nov 2014 12:21:24 -0800 Received: by kaki.bld.corp.google.com (Postfix, from userid 121222) id 68CA4220CDC; Thu, 6 Nov 2014 13:21:24 -0700 (MST) From: Simon Glass To: U-Boot Mailing List Date: Thu, 6 Nov 2014 13:20:23 -0700 Message-Id: <1415305231-30180-32-git-send-email-sjg@chromium.org> X-Mailer: git-send-email 2.1.0.rc2.206.gedb03e5 In-Reply-To: <1415305231-30180-1-git-send-email-sjg@chromium.org> References: <1415305231-30180-1-git-send-email-sjg@chromium.org> Cc: Graeme Russ Subject: [U-Boot] [PATCH 31/39] x86: ivybridge: Check BIST value on boot X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.13 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de 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 --- 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) { 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);