From patchwork Wed Jun 27 17:17:18 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leif Lindholm X-Patchwork-Id: 140370 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp1152049ljj; Wed, 27 Jun 2018 10:18:56 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfmGZvnKZ2T+Nind78LzyFYzXkDP2GZMOYrKpEZcAWTO8w0oZPUcAsTLBPbqeRFPUggKVrt X-Received: by 2002:a37:32cb:: with SMTP id y194-v6mr5852516qky.11.1530119936485; Wed, 27 Jun 2018 10:18:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530119936; cv=none; d=google.com; s=arc-20160816; b=ltJiUmhwo+OLN9DBUWRbyOaAqGeXtq/88nAKGAb4mN44Yj65iYrlSQ8Tr0CP42GRkv mXleaBrOdGCrOvypxjCTaR8gSWZ+WxIMIPnDeFo2fiUjIH9iZ2M6s5qNw09Cftu8Q1eK RkaHBjwLPM9kNp7RSoOf+xeYoyYQF/FLLa70CKH9w/Nuhovjd24MxPU+fhfjuUQ30lWu LgmTgOnUDplNvGxt0CO1y3E9vJxqSsrDXGiGeFTl6invyOuiY8HB8VuVF/xV1OMAtJIx WHf7l82afSce8YBauS3CvSZ7BpMWDi4GBRWuPEdFQNWuPcXEYWs78TXvbROqm6pcp8+e yKrw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:cc:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:references:in-reply-to:message-id:date:subject :to:from:dkim-signature:arc-authentication-results; bh=MbGFomyabspKcMeWSwUa9T9ETbkqecrDZTuSZLkj3Zs=; b=rgIlddEV4IK88I6uE+SZE0IXyeKTX55Qwv8/gJgol/rRzdwuHurR00xLmv/QdASiq3 yvk0mwR3paDwdv0jMHkPtxq3ZPiqppQqg/fwu6LjQ7GQEIR5NeNAXagf8N/iwVqkuy0q lkstWQc031+UER6wl0Zsam5gIU06myM5w71eW5xbqdp2O9skTMct7+X4+DV21eSe5YKs THPVTKAzEnoqtIEGaG0DzM+U6z8T+Afar5tOk2BlBxFUpmRbWcenBkHR8Qwxv8W417Ye f7Lf56DavucBFMrgr1wbZSAXJSxWxb7ojGXKbVPbyllxELOHo34fWLGu3Z7156auAJqd KVww== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=MwWL3AS9; spf=pass (google.com: domain of grub-devel-bounces+patch=linaro.org@gnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom="grub-devel-bounces+patch=linaro.org@gnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id j23-v6si2120794qtj.7.2018.06.27.10.18.56 for (version=TLS1 cipher=AES128-SHA bits=128/128); Wed, 27 Jun 2018 10:18:56 -0700 (PDT) Received-SPF: pass (google.com: domain of grub-devel-bounces+patch=linaro.org@gnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=MwWL3AS9; spf=pass (google.com: domain of grub-devel-bounces+patch=linaro.org@gnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom="grub-devel-bounces+patch=linaro.org@gnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:60569 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fYE5n-0004dG-LW for patch@linaro.org; Wed, 27 Jun 2018 13:18:55 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57653) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fYE4S-0004b1-8i for grub-devel@gnu.org; Wed, 27 Jun 2018 13:17:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fYE4R-0006Qk-8x for grub-devel@gnu.org; Wed, 27 Jun 2018 13:17:32 -0400 Received: from mail-wm0-x22d.google.com ([2a00:1450:400c:c09::22d]:50590) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fYE4R-0006P8-14 for grub-devel@gnu.org; Wed, 27 Jun 2018 13:17:31 -0400 Received: by mail-wm0-x22d.google.com with SMTP id e16-v6so6667116wmd.0 for ; Wed, 27 Jun 2018 10:17:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=z0Nq9Ij3m9J3jbNyWxzW3B8f4DwIMamSf8WOvEdMQsg=; b=MwWL3AS9hzr9oBNFhzVOw2U4mrJNKhUYvObS3jQdQHbnuZMchIu9p9NKakleNEtmn0 CMDO9jSHzJQI/ZBESTdLeTBg/D7kQLd5UDikNtlNKWJQxW9c9iz3pfstguuL2uc3mAVf X37PdGnvFvEhfGf8ln1cB4qoXpqDeFPS72B38= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=z0Nq9Ij3m9J3jbNyWxzW3B8f4DwIMamSf8WOvEdMQsg=; b=s1FAHXnC44Cy65fpfN9e9eM6Ha49hC7MHMl6fMb4QRwXB084fxrGvk04IRBeo5BLCD I5hgUGgcwA8JAeY+dPSEk0+zYOie/QKiX99ReTmM7ZnpBfkUaOdwhzCoWFm5+VIq1xZb 0BWwetRUvSDVlzOyxniTldrzJe1ERRaUeYVPcggohSAkUWtQIoMryO9lV/6hL+0OPI+d xjMae7mtIJkB7wgPX4nQnV9lxSp7QIuXkDsCaYz0xn7snjtHAE5Uhm+qLqOCBNtMMgRZ rkHXMF9bg+IxSGYdNSFMeY9/mwYpuIhiYP/P1WRfkYKjM96h0VxMzIWNJEcErya3gQxK d4tQ== X-Gm-Message-State: APt69E1qXlezThmCQJQFkBTqR0983zpwpLkrO/ixIO0gmOxqH1RV/PcG Zi2cmVKCIlMostzhIgF1Om+rmG/3Ch8= X-Received: by 2002:a1c:ad4:: with SMTP id 203-v6mr5419221wmk.98.1530119849709; Wed, 27 Jun 2018 10:17:29 -0700 (PDT) Received: from vanye.hemma.eciton.net (cpc92302-cmbg19-2-0-cust304.5-4.cable.virginm.net. [82.1.209.49]) by smtp.gmail.com with ESMTPSA id a2-v6sm3406572wmb.6.2018.06.27.10.17.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 27 Jun 2018 10:17:28 -0700 (PDT) From: Leif Lindholm To: grub-devel@gnu.org Subject: [PATCH v3 4/6] arm/efi: switch to arm64 linux loader Date: Wed, 27 Jun 2018 18:17:18 +0100 Message-Id: <20180627171720.27028-5-leif.lindholm@linaro.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180627171720.27028-1-leif.lindholm@linaro.org> References: <20180627171720.27028-1-leif.lindholm@linaro.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c09::22d X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: The development of GNU GRUB Cc: Daniel Kiper MIME-Version: 1.0 Errors-To: grub-devel-bounces+patch=linaro.org@gnu.org Sender: "Grub-devel" Switch over to the EFI-stub aware arm64 loader for 32-bit ARM platforms. This *WILL* stop non-efistub Linux kernels from booting on arm-efi. Signed-off-by: Leif Lindholm --- grub-core/Makefile.core.def | 7 ++++--- grub-core/kern/efi/mm.c | 2 +- include/grub/arm/linux.h | 5 +++++ include/grub/efi/efi.h | 2 -- 4 files changed, 10 insertions(+), 6 deletions(-) -- 2.11.0 _______________________________________________ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel diff --git a/grub-core/Makefile.core.def b/grub-core/Makefile.core.def index fc4767f19..9590e87d9 100644 --- a/grub-core/Makefile.core.def +++ b/grub-core/Makefile.core.def @@ -229,7 +229,6 @@ kernel = { ia64_efi = kern/ia64/cache.c; arm_efi = kern/arm/efi/init.c; - arm_efi = kern/arm/efi/misc.c; arm_efi = kern/efi/fdt.c; arm64_efi = kern/arm64/efi/init.c; @@ -1693,7 +1692,9 @@ module = { powerpc_ieee1275 = loader/powerpc/ieee1275/linux.c; sparc64_ieee1275 = loader/sparc64/ieee1275/linux.c; ia64_efi = loader/ia64/efi/linux.c; - arm = loader/arm/linux.c; + arm_coreboot = loader/arm/linux.c; + arm_efi = loader/arm64/linux.c; + arm_uboot = loader/arm/linux.c; arm64 = loader/arm64/linux.c; common = loader/linux.c; common = lib/cmdline.c; @@ -1702,7 +1703,7 @@ module = { module = { name = fdt; - arm64 = loader/efi/fdt.c; + efi = loader/efi/fdt.c; common = lib/fdt.c; enable = fdt; }; diff --git a/grub-core/kern/efi/mm.c b/grub-core/kern/efi/mm.c index 10ffa2c9b..b6a3f40f7 100644 --- a/grub-core/kern/efi/mm.c +++ b/grub-core/kern/efi/mm.c @@ -630,7 +630,7 @@ grub_efi_mm_init (void) 2 * BYTES_TO_PAGES (MEMORY_MAP_SIZE)); } -#if defined (__aarch64__) +#if defined (__aarch64__) || defined (__arm__) grub_err_t grub_efi_get_ram_base(grub_addr_t *base_addr) { diff --git a/include/grub/arm/linux.h b/include/grub/arm/linux.h index cceb9c4a9..54658af1b 100644 --- a/include/grub/arm/linux.h +++ b/include/grub/arm/linux.h @@ -34,6 +34,11 @@ struct linux_arm_kernel_header { grub_uint32_t hdr_offset; }; +#if defined(__arm__) +# define LINUX_ARMXX_MAGIC_SIGNATURE GRUB_LINUX_ARM_MAGIC_SIGNATURE +# define linux_armxx_kernel_header linux_arm_kernel_header +#endif + #if defined GRUB_MACHINE_UBOOT # include # define LINUX_ADDRESS (start_of_ram + 0x8000) diff --git a/include/grub/efi/efi.h b/include/grub/efi/efi.h index 5888bf6ac..e75c730c0 100644 --- a/include/grub/efi/efi.h +++ b/include/grub/efi/efi.h @@ -92,8 +92,6 @@ extern void (*EXPORT_VAR(grub_efi_net_config)) (grub_efi_handle_t hnd, #if defined(__arm__) || defined(__aarch64__) void *EXPORT_FUNC(grub_efi_get_firmware_fdt)(void); -#endif -#if defined(__aarch64__) grub_err_t EXPORT_FUNC(grub_efi_get_ram_base)(grub_addr_t *); #include grub_err_t grub_efi_linux_check_image(struct linux_armxx_kernel_header *lh);