From patchwork Fri May 23 13:16:56 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leif Lindholm X-Patchwork-Id: 30779 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-yh0-f71.google.com (mail-yh0-f71.google.com [209.85.213.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id B8F392066E for ; Fri, 23 May 2014 13:15:12 +0000 (UTC) Received: by mail-yh0-f71.google.com with SMTP id 29sf18734721yhl.10 for ; Fri, 23 May 2014 06:15:12 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:date:from:to:subject:message-id :references:mime-version:in-reply-to:user-agent:cc:precedence :list-id:list-unsubscribe:list-archive:list-post:list-help :list-subscribe:sender:errors-to:x-original-sender :x-original-authentication-results:mailing-list:content-disposition :content-type:content-transfer-encoding; bh=GDz7TrSJSt5KadWoaOVAyWDzCaVnC8Qnt+wbo09lt4o=; b=UChkTdPDx/vAVGpkqlGK9rOnuy0dDtIYRnqckZJpvSe3NiS8ra0/u1sGVt9DjlloZS 46yc+kldtTTEd6dCmcGharaPQHjEs2LzwKZAjKt8Ur4R8G6cZ55+b+aDKrGye5Tie7h/ q6oV6Im7voJVWyTwswZUAOZsc45yxERSDgv1jc8n7LzZfwGKfnUvXDjDamsME8d3es3r wFHf1LM/gS4Whod4Y8FmGnqZvNIUjq+FuzmmrYbzEfUU+gEEl3mOGzB0q6WaczT2u6j4 YYPoX+ejEMw5lhec6yebNRIuR5CTBfuxMBwEDCYCWFOqLKbnKrMCDZBgOsZKCm/JK9wd mzDQ== X-Gm-Message-State: ALoCoQldGO+MhuRGTgZbvkVNxJjDdkn8/EVllnZEO/VZQm6VXUzPzG+GjZ2Jldy1oBHTIU1mHnmN X-Received: by 10.236.159.39 with SMTP id r27mr1985801yhk.7.1400850912564; Fri, 23 May 2014 06:15:12 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.87.141 with SMTP id r13ls1839984qgd.98.gmail; Fri, 23 May 2014 06:15:12 -0700 (PDT) X-Received: by 10.220.95.204 with SMTP id e12mr1128452vcn.37.1400850912488; Fri, 23 May 2014 06:15:12 -0700 (PDT) Received: from mail-ve0-f176.google.com (mail-ve0-f176.google.com [209.85.128.176]) by mx.google.com with ESMTPS id xa4si1593703vcb.12.2014.05.23.06.15.12 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 23 May 2014 06:15:12 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.128.176 as permitted sender) client-ip=209.85.128.176; Received: by mail-ve0-f176.google.com with SMTP id jz11so6175341veb.21 for ; Fri, 23 May 2014 06:15:12 -0700 (PDT) X-Received: by 10.53.13.133 with SMTP id ey5mr3452687vdd.8.1400850912407; Fri, 23 May 2014 06:15:12 -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.220.221.72 with SMTP id ib8csp30686vcb; Fri, 23 May 2014 06:15:12 -0700 (PDT) X-Received: by 10.224.50.205 with SMTP id a13mr6425077qag.19.1400850911797; Fri, 23 May 2014 06:15:11 -0700 (PDT) Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id 9si3514813qan.42.2014.05.23.06.15.11 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 23 May 2014 06:15:11 -0700 (PDT) Received-SPF: none (google.com: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org does not designate permitted sender hosts) client-ip=2001:1868:205::9; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1WnpIG-00012P-CT; Fri, 23 May 2014 13:13:52 +0000 Received: from mail-we0-f179.google.com ([74.125.82.179]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WnpHr-0000bQ-Vu for linux-arm-kernel@lists.infradead.org; Fri, 23 May 2014 13:13:33 +0000 Received: by mail-we0-f179.google.com with SMTP id q59so4790218wes.38 for ; Fri, 23 May 2014 06:12:25 -0700 (PDT) X-Received: by 10.180.13.113 with SMTP id g17mr3266114wic.48.1400850745208; Fri, 23 May 2014 06:12:25 -0700 (PDT) Received: from bivouac.eciton.net ([2a00:1098:0:86:1000:23:0:2]) by mx.google.com with ESMTPSA id en6sm2895755wib.11.2014.05.23.06.12.22 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 23 May 2014 06:12:23 -0700 (PDT) Date: Fri, 23 May 2014 14:16:56 +0100 From: Leif Lindholm To: Catalin Marinas Subject: Re: EFI_STUB fails to boot non-EFI on arm64 Message-ID: <20140523131656.GR4179@bivouac.eciton.net> References: <20140523094513.GC9252@arm.com> MIME-Version: 1.0 In-Reply-To: <20140523094513.GC9252@arm.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140523_061328_170996_F4FFC29B X-CRM114-Status: GOOD ( 18.56 ) X-Spam-Score: -0.7 (/) X-Spam-Report: SpamAssassin version 3.3.2 on bombadil.infradead.org summary: Content analysis details: (-0.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [74.125.82.179 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record Cc: Roy Franz , linux-efi@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Mark Salter X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: leif.lindholm@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.128.176 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 Content-Disposition: inline On Fri, May 23, 2014 at 10:45:13AM +0100, Catalin Marinas wrote: > As the EFI_STUB for arm64 got into tip and soon into -next, I thought > about giving it a try (tip/arm64/efi). Using my boot-wrapper (non-EFI) > is still supposed to work but I get the trace below. It looks like > memmap.map is NULL but the code still assumes the kernel was started as > an EFI app. > > Have you guys tested these patches properly? Apparently not sufficuently... Sorry about that. Fix appended: >From 98433920394730d835f0061474832909c0740f29 Mon Sep 17 00:00:00 2001 From: Leif Lindholm Date: Fri, 23 May 2014 11:23:23 +0100 Subject: [PATCH] arm64: efi: only attempt efi map setup if booting via EFI Booting a kernel with CONFIG_EFI enabled on a non-EFI system caused an oops with the current UEFI support code. Add the required test to prevent this. Signed-off-by: Leif Lindholm Acked-by: Catalin Marinas --- arch/arm64/kernel/efi.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/arm64/kernel/efi.c b/arch/arm64/kernel/efi.c index 7bfd650..14db1f6 100644 --- a/arch/arm64/kernel/efi.c +++ b/arch/arm64/kernel/efi.c @@ -333,6 +333,9 @@ void __init efi_init(void) void __init efi_idmap_init(void) { + if (!efi_enabled(EFI_BOOT)) + return; + /* boot time idmap_pg_dir is incomplete, so fill in missing parts */ efi_setup_idmap(); }