From patchwork Mon Oct 20 18:29:42 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Rutland X-Patchwork-Id: 39069 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f72.google.com (mail-la0-f72.google.com [209.85.215.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 15618202DB for ; Mon, 20 Oct 2014 18:30:32 +0000 (UTC) Received: by mail-la0-f72.google.com with SMTP id gq15sf2847149lab.11 for ; Mon, 20 Oct 2014 11:30:31 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:sender:precedence:list-id:x-original-sender :x-original-authentication-results:mailing-list:list-post:list-help :list-archive:list-unsubscribe; bh=e+iyJ/V46VP28MLSdaAmZxIMYHJ6As+KPHuHoJcM1gI=; b=UsKlAOFj2WDn3AYmMYuifHh7xyZK/USd3XG7sBaqIz+sZNgsPpgpk5+UG6Y0QwWdT0 GM798xCSXJMm9n9h19kMHK2Xr/NjiCh+FzZrQuAp7BcYFbMvYlJ0X6XlCo+nSuLsFdY0 1q6bHYabWqwosbm0Yykobt++v6bY1ocQSP5rfDhIU9BBPUZc6eQW0wzVcxnquaudaKds R6zYrCojvTN6rcx8Ae4VVI+bgj7JIa/C5Ggs+o65hYH2nZunYRMevP/gb74hKjksn0Vt DAtqGHrBDQyKKS3U8TWkMEQ5vtJT9lnOhb1WyXzubE25HNN7ZUxdpgC7VpdCIUPr7mSn 85xA== X-Gm-Message-State: ALoCoQlcr4F7f+pW1maih+LBRPw0uEAhyrbANJ8QUb/9sNhQz43VhdoGDOKM0PXOXISgf/ISGs0T X-Received: by 10.180.93.35 with SMTP id cr3mr2729567wib.2.1413829831382; Mon, 20 Oct 2014 11:30:31 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.23.227 with SMTP id p3ls495529laf.39.gmail; Mon, 20 Oct 2014 11:30:31 -0700 (PDT) X-Received: by 10.112.52.33 with SMTP id q1mr30162877lbo.42.1413829831183; Mon, 20 Oct 2014 11:30:31 -0700 (PDT) Received: from mail-la0-f53.google.com (mail-la0-f53.google.com. [209.85.215.53]) by mx.google.com with ESMTPS id lf6si15601918lab.14.2014.10.20.11.30.31 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 20 Oct 2014 11:30:31 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.53 as permitted sender) client-ip=209.85.215.53; Received: by mail-la0-f53.google.com with SMTP id gq15so4428408lab.26 for ; Mon, 20 Oct 2014 11:30:31 -0700 (PDT) X-Received: by 10.112.12.35 with SMTP id v3mr11168855lbb.80.1413829831031; Mon, 20 Oct 2014 11:30:31 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.84.229 with SMTP id c5csp362457lbz; Mon, 20 Oct 2014 11:30:30 -0700 (PDT) X-Received: by 10.70.47.165 with SMTP id e5mr1719179pdn.88.1413829829478; Mon, 20 Oct 2014 11:30:29 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id nz10si8566378pdb.211.2014.10.20.11.30.28 for ; Mon, 20 Oct 2014 11:30:29 -0700 (PDT) Received-SPF: none (google.com: linux-kernel-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752763AbaJTSaZ (ORCPT + 27 others); Mon, 20 Oct 2014 14:30:25 -0400 Received: from cam-admin0.cambridge.arm.com ([217.140.96.50]:33392 "EHLO cam-admin0.cambridge.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751109AbaJTSaY (ORCPT ); Mon, 20 Oct 2014 14:30:24 -0400 Received: from leverpostej.cambridge.arm.com (leverpostej.cambridge.arm.com [10.1.205.151]) by cam-admin0.cambridge.arm.com (8.12.6/8.12.6) with ESMTP id s9KITpwo010159; Mon, 20 Oct 2014 19:29:52 +0100 (BST) From: Mark Rutland To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: Mark Rutland , Ard Biesheuvel , Mark Salter , Matt Fleming , Roy Franz Subject: [PATCH] efi: efi-stub: notify on DTB absence Date: Mon, 20 Oct 2014 19:29:42 +0100 Message-Id: <1413829782-12891-1-git-send-email-mark.rutland@arm.com> X-Mailer: git-send-email 1.9.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: mark.rutland@arm.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.53 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , In the absence of an DTB configuration table, the EFI stub will happily continue attempting to boot a kernel, despite the fact that this kernel may not function without a description of the hardware. In this case, as with a typo'd "dtb=" option (e.g. "dbt=") or many other possible failures, the only output seen by the user will be the rather terse output from the EFI stub: EFI stub: Booting Linux Kernel... To aid those attempting to debug such failures, this patch adds a notice when no DTB is found, making the output more helpful: EFI stub: Booting Linux Kernel... EFI stub: Generating empty DTB Similarly, a positive acknowledgement is added when a user-specified DTB is in use: EFI stub: Booting Linux Kernel... EFI stub: Using DTB from command line Signed-off-by: Mark Rutland Acked-by: Leif Lindholm Cc: Ard Biesheuvel Cc: Mark Salter Cc: Matt Fleming Cc: Roy Franz Acked-by: Ard Biesheuvel Acked-by: Roy Franz --- drivers/firmware/efi/libstub/arm-stub.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/firmware/efi/libstub/arm-stub.c b/drivers/firmware/efi/libstub/arm-stub.c index 480339b..10abf24 100644 --- a/drivers/firmware/efi/libstub/arm-stub.c +++ b/drivers/firmware/efi/libstub/arm-stub.c @@ -243,9 +243,16 @@ unsigned long __init efi_entry(void *handle, efi_system_table_t *sys_table, goto fail_free_cmdline; } } - if (!fdt_addr) + + if (fdt_addr) { + pr_efi(sys_table, "Using DTB from command line\n"); + } else { /* Look for a device tree configuration table entry. */ fdt_addr = (uintptr_t)get_fdt(sys_table); + } + + if (!fdt_addr) + pr_efi(sys_table, "Generating empty DTB\n"); status = handle_cmdline_files(sys_table, image, cmdline_ptr, "initrd=", dram_base + SZ_512M,