From patchwork Fri Apr 10 13:53:55 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 47052 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f200.google.com (mail-lb0-f200.google.com [209.85.217.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id D9111218D9 for ; Fri, 10 Apr 2015 14:05:07 +0000 (UTC) Received: by lbbrr5 with SMTP id rr5sf4581314lbb.3 for ; Fri, 10 Apr 2015 07:05:06 -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:from:to:subject:date:message-id :in-reply-to:references:cc:precedence:list-id:list-unsubscribe :list-archive:list-post:list-help:list-subscribe:mime-version :content-type:content-transfer-encoding:sender:errors-to :x-original-sender:x-original-authentication-results:mailing-list; bh=XwjdiY0ZxSbALo9wwM33NGFTzyrMiTmp1DVYRTSqhtw=; b=GdKIgVAJaX11JjPFKF1LYss5nar+KEAHjOTB/7pxbhqM5rwdAzJRcOkepn38PQdFHb 6hqnm9qFYTb51GUu8pirJIRT8hi41bZTW7dWCj2H/qoBi3mq6hLSJs9ghBLsM4huNcY8 CqDrEYjn5KErFI77ex65Zc6KmYt6TPvXEiBUZkDvDftnx7UOYxtbY/TaEUwq1+ARlPDm uhUZy03ujxkYftPl2b0w0OZxlXmkyU32kjLjgB03GR+IIC5hzq/FjPs8FL21G3998TtS ALXG+Nu0GoUmNbztA3pg0CD4uzZdOrIS2FajgqDAuJuVY5ArNrUKwTWU//DaQO5cI38k OacA== X-Gm-Message-State: ALoCoQm7jyx6UDoMXFmJlJIRgq9fP18HAWbmLhxeMjeG9l7UUP9bvqHYYAXM2QZI5dA21k3FgzXe X-Received: by 10.152.23.7 with SMTP id i7mr355104laf.1.1428674706809; Fri, 10 Apr 2015 07:05:06 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.245.43 with SMTP id xl11ls446984lac.21.gmail; Fri, 10 Apr 2015 07:05:06 -0700 (PDT) X-Received: by 10.112.204.6 with SMTP id ku6mr1572933lbc.73.1428674706672; Fri, 10 Apr 2015 07:05:06 -0700 (PDT) Received: from mail-lb0-f169.google.com (mail-lb0-f169.google.com. [209.85.217.169]) by mx.google.com with ESMTPS id yl9si1564487lbb.93.2015.04.10.07.05.06 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 10 Apr 2015 07:05:06 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.169 as permitted sender) client-ip=209.85.217.169; Received: by lbbuc2 with SMTP id uc2so14459725lbb.2 for ; Fri, 10 Apr 2015 07:05:06 -0700 (PDT) X-Received: by 10.112.140.231 with SMTP id rj7mr1588095lbb.76.1428674706595; Fri, 10 Apr 2015 07:05:06 -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.67.65 with SMTP id l1csp1123025lbt; Fri, 10 Apr 2015 07:05:05 -0700 (PDT) X-Received: by 10.66.192.1 with SMTP id hc1mr3018157pac.38.1428674704673; Fri, 10 Apr 2015 07:05:04 -0700 (PDT) Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id qc10si3089297pac.160.2015.04.10.07.05.03 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 10 Apr 2015 07:05:04 -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 1YgZVv-0005T9-PH; Fri, 10 Apr 2015 14:02:31 +0000 Received: from mail-wi0-f172.google.com ([209.85.212.172]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1YgZOU-0006LG-Gs for linux-arm-kernel@lists.infradead.org; Fri, 10 Apr 2015 13:54:51 +0000 Received: by wiax7 with SMTP id x7so16751635wia.0 for ; Fri, 10 Apr 2015 06:54:29 -0700 (PDT) X-Received: by 10.194.88.131 with SMTP id bg3mr3356569wjb.119.1428674069182; Fri, 10 Apr 2015 06:54:29 -0700 (PDT) Received: from ards-macbook-pro.local ([84.78.25.50]) by mx.google.com with ESMTPSA id e2sm3051482wjy.46.2015.04.10.06.54.27 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 10 Apr 2015 06:54:28 -0700 (PDT) From: Ard Biesheuvel To: mark.rutland@arm.com, catalin.marinas@arm.com, linux-arm-kernel@lists.infradead.org Subject: [PATCH v3 11/11] arm64/efi: adapt to relaxed kernel Image placement requirements Date: Fri, 10 Apr 2015 15:53:55 +0200 Message-Id: <1428674035-26603-12-git-send-email-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1428674035-26603-1-git-send-email-ard.biesheuvel@linaro.org> References: <1428674035-26603-1-git-send-email-ard.biesheuvel@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150410_065450_734283_FB2774FE X-CRM114-Status: GOOD ( 10.61 ) X-Spam-Score: -0.7 (/) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-0.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [209.85.212.172 listed in wl.mailspike.net] -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.212.172 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders Cc: Ard Biesheuvel X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , MIME-Version: 1.0 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: ard.biesheuvel@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.217.169 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 This adapts the EFI stub kernel placement to the new relaxed requirements, by placing the kernel Image at the highest available 2 MB offset in physical memory. Signed-off-by: Ard Biesheuvel --- arch/arm64/kernel/efi-stub.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm64/kernel/efi-stub.c b/arch/arm64/kernel/efi-stub.c index f5374065ad53..c2141ed8a043 100644 --- a/arch/arm64/kernel/efi-stub.c +++ b/arch/arm64/kernel/efi-stub.c @@ -28,8 +28,8 @@ efi_status_t __init handle_kernel_image(efi_system_table_t *sys_table, kernel_size = _edata - _text; if (*image_addr != (dram_base + TEXT_OFFSET)) { kernel_memsize = kernel_size + (_end - _edata); - status = efi_low_alloc(sys_table, kernel_memsize + TEXT_OFFSET, - SZ_2M, reserve_addr); + status = efi_high_alloc(sys_table, kernel_memsize + TEXT_OFFSET, + SZ_2M, reserve_addr, ULONG_MAX); if (status != EFI_SUCCESS) { pr_efi_err(sys_table, "Failed to relocate kernel\n"); return status;