From patchwork Wed Jul 2 12:54:41 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 32979 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-oa0-f72.google.com (mail-oa0-f72.google.com [209.85.219.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 6080D20560 for ; Wed, 2 Jul 2014 12:57:32 +0000 (UTC) Received: by mail-oa0-f72.google.com with SMTP id eb12sf68370552oac.11 for ; Wed, 02 Jul 2014 05:57:32 -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=BmYlicoqbT/NxYqpudqS+Ggr6p+Tg6kVNlSNb+3cDN8=; b=FH3DksIJYMMm1gM2KX790Fg1cpOFEk9eX2g5TUZRZo2koHSgibsbMOf2iTknf/g7m1 mcJY/MjT8xTa60jfwofYeUKjfZAbBoINLWWDmGDFvY6FLYrgjvPyGqDTHKNUldxSaZs2 24K6ys6mg9iNUTm5ANE3d6xCombQGzj4Jp6jRFz3s7cEERmsn/ZNdzMwCF46Swk0mudW Z5JwYLSy+KMlKzvz8zD84StJfDFHbHQUTe094pXlFUEXa/+QypI682282vSu4Vncy8+e jTPFgWx90Moz1MtVY9ca9cezxUjyX1gbcOm2YSbDn0Q311SFqf0dC5RjY1o2akV4sYJe 5jAw== X-Gm-Message-State: ALoCoQnthglBMDq/2kR9TrRhuEbX5j5CoIibU/gvVPv/N3ZQRHwVhHRGAu39cwLwLFAdWKR4B9zs X-Received: by 10.42.39.140 with SMTP id h12mr1909189ice.9.1404305852050; Wed, 02 Jul 2014 05:57:32 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.23.210 with SMTP id 76ls31056qgp.33.gmail; Wed, 02 Jul 2014 05:57:31 -0700 (PDT) X-Received: by 10.52.138.232 with SMTP id qt8mr300621vdb.44.1404305851950; Wed, 02 Jul 2014 05:57:31 -0700 (PDT) Received: from mail-vc0-f179.google.com (mail-vc0-f179.google.com [209.85.220.179]) by mx.google.com with ESMTPS id qi1si12860463veb.60.2014.07.02.05.57.31 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 02 Jul 2014 05:57:31 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.179 as permitted sender) client-ip=209.85.220.179; Received: by mail-vc0-f179.google.com with SMTP id id10so10459105vcb.10 for ; Wed, 02 Jul 2014 05:57:31 -0700 (PDT) X-Received: by 10.52.135.226 with SMTP id pv2mr41394756vdb.33.1404305851865; Wed, 02 Jul 2014 05:57: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.221.37.5 with SMTP id tc5csp291146vcb; Wed, 2 Jul 2014 05:57:31 -0700 (PDT) X-Received: by 10.66.141.109 with SMTP id rn13mr3770998pab.117.1404305851190; Wed, 02 Jul 2014 05:57:31 -0700 (PDT) Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id zd5si30229508pac.39.2014.07.02.05.57.30 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 02 Jul 2014 05:57:31 -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 1X2K4S-0007jz-Ka; Wed, 02 Jul 2014 12:55:32 +0000 Received: from mail-wg0-f46.google.com ([74.125.82.46]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1X2K4J-0006Zp-Dg for linux-arm-kernel@lists.infradead.org; Wed, 02 Jul 2014 12:55:24 +0000 Received: by mail-wg0-f46.google.com with SMTP id y10so11236730wgg.29 for ; Wed, 02 Jul 2014 05:55:00 -0700 (PDT) X-Received: by 10.194.10.36 with SMTP id f4mr57746377wjb.61.1404305700250; Wed, 02 Jul 2014 05:55:00 -0700 (PDT) Received: from ards-macbook-pro.local ([37.183.67.249]) by mx.google.com with ESMTPSA id r9sm54934910wia.17.2014.07.02.05.54.58 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 02 Jul 2014 05:54:59 -0700 (PDT) From: Ard Biesheuvel To: matt.fleming@intel.com, x86@kernel.org Subject: [PATCH v3 3/5] efi/arm64: efistub: Move shared dependencies to Date: Wed, 2 Jul 2014 14:54:41 +0200 Message-Id: <1404305683-26501-4-git-send-email-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1404305683-26501-1-git-send-email-ard.biesheuvel@linaro.org> References: <1404305683-26501-1-git-send-email-ard.biesheuvel@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140702_055523_612224_551397E9 X-CRM114-Status: GOOD ( 11.79 ) 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 [74.125.82.46 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [74.125.82.46 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.179 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 Signed-off-by: Matt Fleming --- 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);