From patchwork Thu Oct 23 15:33:33 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Rutland X-Patchwork-Id: 39376 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wg0-f72.google.com (mail-wg0-f72.google.com [74.125.82.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 8130E24022 for ; Thu, 23 Oct 2014 15:34:29 +0000 (UTC) Received: by mail-wg0-f72.google.com with SMTP id m15sf736882wgh.7 for ; Thu, 23 Oct 2014 08:34:28 -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=DZs2HnQOFz42fnxdIOAUEV1SEgBDeCSkJrr+ECZXulM=; b=hvcyYEjFnxGxReSchgt1boTlF3KNTYskGqsq7tUm2xcuKIzJ8FSRO9GoP8/jyg6Ih2 XoWwcyGn6Snedr2Ljn2LK2Z/M/eSLBEOv6JUWltwc2slWxvWhPIphq74mBTKzJ1Am5TD EjGbWDOrwHBAffswjQlgZMZU2TbDKciTbHyIAWhvdz8MI2iwPJqBYx6trIoqoFe7hqpf HI0sRvHmYfE/Ki4iD9Z/xWqnvcnwzsRpRI4e0f9p9TgvivGHHRi8mFYIjtVospCV3sZQ lH4LkCOWrqHJkZyVcls7H7rKYwBPVltoZhNLpXL+oOjpgFqGp5FkhlJRep77ypghrRQt Y8/A== X-Gm-Message-State: ALoCoQm7bY0iwuNtZa65Xe/JfCFboeV5VXv5nAXxW1kb6wspeYWiaGVit25Z3/jEp6d/XoHERglc X-Received: by 10.152.21.170 with SMTP id w10mr1039207lae.6.1414078468641; Thu, 23 Oct 2014 08:34:28 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.4.7 with SMTP id g7ls342231lag.43.gmail; Thu, 23 Oct 2014 08:34:28 -0700 (PDT) X-Received: by 10.112.247.43 with SMTP id yb11mr5896344lbc.51.1414078468467; Thu, 23 Oct 2014 08:34:28 -0700 (PDT) Received: from mail-la0-f48.google.com (mail-la0-f48.google.com. [209.85.215.48]) by mx.google.com with ESMTPS id k3si3152111lbs.64.2014.10.23.08.34.28 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 23 Oct 2014 08:34:28 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.48 as permitted sender) client-ip=209.85.215.48; Received: by mail-la0-f48.google.com with SMTP id gi9so1085863lab.35 for ; Thu, 23 Oct 2014 08:34:28 -0700 (PDT) X-Received: by 10.112.14.69 with SMTP id n5mr5998090lbc.34.1414078468303; Thu, 23 Oct 2014 08:34:28 -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 c5csp276126lbz; Thu, 23 Oct 2014 08:34:27 -0700 (PDT) X-Received: by 10.70.54.198 with SMTP id l6mr5665350pdp.7.1414078466609; Thu, 23 Oct 2014 08:34:26 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w13si1963968pdj.33.2014.10.23.08.34.25 for ; Thu, 23 Oct 2014 08:34:26 -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 S1755291AbaJWPeW (ORCPT + 28 others); Thu, 23 Oct 2014 11:34:22 -0400 Received: from cam-admin0.cambridge.arm.com ([217.140.96.50]:60351 "EHLO cam-admin0.cambridge.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754764AbaJWPeU (ORCPT ); Thu, 23 Oct 2014 11:34:20 -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 s9NFXkwo009095; Thu, 23 Oct 2014 16:33:46 +0100 (BST) From: Mark Rutland To: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org, leif.lindholm@linaro.org, ard.biesheuvel@linaro.org, msalter@redhat.com, matt.fleming@intel.com, roy.franz@linaro.org, Mark Rutland Subject: [PATCHv2] efi: efi-stub: notify on DTB absence Date: Thu, 23 Oct 2014 16:33:33 +0100 Message-Id: <1414078413-15439-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.48 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: , Since v1 [1]: * Add a positive acknowledgement for a configuration table DTB * Fixed a couple of typos in the commit message Ard, Leif, Roy, I've assumed your acks from v1 are still valid with the additional print. Please shout if that's not the case. Thanks, Mark. [1] http://lists.infradead.org/pipermail/linux-arm-kernel/2014-October/295521.html ---->8---- In the absence of a 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 Additionally, 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 Similarly, a positive acknowledgement is added when a DTB from a configuration table is in use: EFI stub: Booting Linux Kernel... EFI stub: Using DTB from configuration table Signed-off-by: Mark Rutland Acked-by: Leif Lindholm Acked-by: Ard Biesheuvel Cc: Mark Salter Cc: Matt Fleming Acked-by: Roy Franz Acked-by: Mark Salter Acked-by: Roy Franz --- drivers/firmware/efi/libstub/arm-stub.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/drivers/firmware/efi/libstub/arm-stub.c b/drivers/firmware/efi/libstub/arm-stub.c index 480339b..21fa50e 100644 --- a/drivers/firmware/efi/libstub/arm-stub.c +++ b/drivers/firmware/efi/libstub/arm-stub.c @@ -243,9 +243,18 @@ 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, "Using DTB from configuration table\n"); + } + + 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,