From patchwork Thu Jun 26 14:23:35 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 32563 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pa0-f71.google.com (mail-pa0-f71.google.com [209.85.220.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id C1B1A2066E for ; Thu, 26 Jun 2014 14:32:27 +0000 (UTC) Received: by mail-pa0-f71.google.com with SMTP id eu11sf14134558pac.6 for ; Thu, 26 Jun 2014 07:32:26 -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:sender :errors-to:x-original-sender:x-original-authentication-results :mailing-list:content-type:content-transfer-encoding; bh=iRBpjm9FSFUTs85hWs0CSEa93gnVW51461vBFYFZqe0=; b=aBAyzORidYj+qP3rtf8Brmpb9RPz0Gf2rWg8g4sbVIR2hJfaPSTvZsgY6OeETUd+gq R/oEODRnH+4eLDX0bbxwbpmtRUxKQUPC5SsSdxC5CLOvvxU7L2S++siZx6kI+H2EhTiM 5iLGjHzeg0aKWhxRU4FHFgWBIQGCDWYfqdKm+qx3A0LSs/UPGs7DD0kJZW0GDhY43gYo EtGYOnI8RPvo+xHxHZ3yVIMV2Uakqwt9MiMZuVpq6HO4zx6yZNaS5t6Zgr0d6zkn0VCn rWymfQ/Csyt0wV+X53OUNDwd0U2y4zmnKpdN/qkE3+SH+qzV1B+zLU8iD2CeZFJnAt3R cvNA== X-Gm-Message-State: ALoCoQmAI3hVZsRHbilKO08AfcCz5TBXwDLykZ9M6NaKgCQ2x/OCcrfxw7mOzz7uApiLBhm7QJ2D X-Received: by 10.66.169.231 with SMTP id ah7mr8386123pac.40.1403793146349; Thu, 26 Jun 2014 07:32:26 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.103.118 with SMTP id x109ls251973qge.74.gmail; Thu, 26 Jun 2014 07:32:26 -0700 (PDT) X-Received: by 10.58.220.230 with SMTP id pz6mr13714532vec.9.1403793146126; Thu, 26 Jun 2014 07:32:26 -0700 (PDT) Received: from mail-vc0-f177.google.com (mail-vc0-f177.google.com [209.85.220.177]) by mx.google.com with ESMTPS id li19si4464625vdb.62.2014.06.26.07.32.26 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 26 Jun 2014 07:32:26 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.177 as permitted sender) client-ip=209.85.220.177; Received: by mail-vc0-f177.google.com with SMTP id ij19so3563014vcb.22 for ; Thu, 26 Jun 2014 07:32:26 -0700 (PDT) X-Received: by 10.52.253.131 with SMTP id aa3mr7481837vdd.25.1403793146013; Thu, 26 Jun 2014 07:32:26 -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.221.37.5 with SMTP id tc5csp34611vcb; Thu, 26 Jun 2014 07:32:25 -0700 (PDT) X-Received: by 10.66.66.133 with SMTP id f5mr21567612pat.81.1403793145114; Thu, 26 Jun 2014 07:32:25 -0700 (PDT) Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id il2si10099146pbc.87.2014.06.26.07.32.24 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 26 Jun 2014 07:32:25 -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 1X0AhO-0004vI-RP; Thu, 26 Jun 2014 14:30:50 +0000 Received: from mail-wi0-f175.google.com ([209.85.212.175]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1X0AhI-0004iA-IB for linux-arm-kernel@lists.infradead.org; Thu, 26 Jun 2014 14:30:49 +0000 Received: by mail-wi0-f175.google.com with SMTP id r20so1161370wiv.2 for ; Thu, 26 Jun 2014 07:30:21 -0700 (PDT) X-Received: by 10.194.110.100 with SMTP id hz4mr18341554wjb.65.1403792631430; Thu, 26 Jun 2014 07:23:51 -0700 (PDT) Received: from ards-macbook-pro.local ([109.114.99.252]) by mx.google.com with ESMTPSA id jb16sm25046864wic.10.2014.06.26.07.23.49 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 26 Jun 2014 07:23:50 -0700 (PDT) From: Ard Biesheuvel To: matt.fleming@intel.com, x86@kernel.org Subject: [PATCH v2 3/5] efi/arm64: efistub: move shared dependencies to Date: Thu, 26 Jun 2014 16:23:35 +0200 Message-Id: <1403792617-25792-4-git-send-email-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1403792617-25792-1-git-send-email-ard.biesheuvel@linaro.org> References: <1403792617-25792-1-git-send-email-ard.biesheuvel@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140626_073044_745557_20A50E88 X-CRM114-Status: GOOD ( 11.88 ) 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.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.212.175 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [209.85.212.175 listed in wl.mailspike.net] -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders Cc: linux-efi@vger.kernel.org, Ard Biesheuvel , catalin.marinas@arm.com, msalter@redhat.com, leif.lindholm@linaro.org, roy.franz@linaro.org, hpa@zytor.com, linux-arm-kernel@lists.infradead.org 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.220.177 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 moves definitions depended upon both by code under arch/arm64/boot and under drivers/firmware/efi to . This is in preparation of turning the stub code under drivers/firmware/efi into a static library. Signed-off-by: Ard Biesheuvel --- arch/arm64/include/asm/efi.h | 12 ++++++++++++ arch/arm64/kernel/efi-stub.c | 11 +---------- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/arch/arm64/include/asm/efi.h b/arch/arm64/include/asm/efi.h index 375ba342dca6..a34fd3b12e2b 100644 --- a/arch/arm64/include/asm/efi.h +++ b/arch/arm64/include/asm/efi.h @@ -32,4 +32,16 @@ extern void efi_idmap_init(void); kernel_neon_end(); \ }) +/* arch specific definitions used by the stub code */ + +/* + * AArch64 requires the DTB to be 8-byte aligned in the first 512MiB from + * start of kernel and may not cross a 2MiB boundary. We set alignment to + * 2MiB so we know it won't cross a 2MiB boundary. + */ +#define EFI_FDT_ALIGN SZ_2M /* used by allocate_new_fdt_and_exit_boot() */ +#define MAX_FDT_OFFSET SZ_512M + +#define efi_call_early(f, ...) sys_table_arg->boottime->f(__VA_ARGS__) + #endif /* _ASM_EFI_H */ diff --git a/arch/arm64/kernel/efi-stub.c b/arch/arm64/kernel/efi-stub.c index 7aa7155a9740..23cbde4324b1 100644 --- a/arch/arm64/kernel/efi-stub.c +++ b/arch/arm64/kernel/efi-stub.c @@ -10,19 +10,10 @@ * */ #include +#include #include #include -/* - * AArch64 requires the DTB to be 8-byte aligned in the first 512MiB from - * start of kernel and may not cross a 2MiB boundary. We set alignment to - * 2MiB so we know it won't cross a 2MiB boundary. - */ -#define EFI_FDT_ALIGN SZ_2M /* used by allocate_new_fdt_and_exit_boot() */ -#define MAX_FDT_OFFSET SZ_512M - -#define efi_call_early(f, ...) sys_table_arg->boottime->f(__VA_ARGS__) - static void efi_char16_printk(efi_system_table_t *sys_table_arg, efi_char16_t *str);