From patchwork Mon Jul 9 17:32:59 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leif Lindholm X-Patchwork-Id: 141474 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp2922818ljj; Mon, 9 Jul 2018 10:33:26 -0700 (PDT) X-Google-Smtp-Source: AAOMgpc5IYzLBpnMWOi4LvKG/TD407eW6BQENKrxlFhUgwKpwFhRTtWlWEHsMFO/b7rk8JXyniQE X-Received: by 2002:ac8:367:: with SMTP id w39-v6mr20174909qtg.334.1531157606690; Mon, 09 Jul 2018 10:33:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531157606; cv=none; d=google.com; s=arc-20160816; b=U86dPEPlUMFJ2y8tHE6WiDfGuSx96jeZS30DLxcUfU94DQAQ9GN3DQM4/wdJmj0jj6 NKACyYHQqXus+nua9jMUDf7ff2+/mvrcvjehXD2l1hFfS+5hYbpDyD+RFxdtIM5NP+ah ueoVmuEe8KRSiumq0CRsh4lBh1WRghEcl4GLCTR6kdideKf9qETGuv7IL2Jr43YKgcmv y2hAdLivBsZN41/kDDrGq7AIcfkHCU7/RAZc7avEhZrFoj31qJAPQto0/QJk5+2syh1i DOTwiHly5Xzu7R0u2ztcXO88rG0z5TB4fGzp5F64ArapS0SNR6tMyzWxW5T9AxXkECtc i1hw== 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:message-id:date:subject:to:from:dkim-signature :arc-authentication-results; bh=NIVyl1GcXLSgcvBg554FPaRWjPOqpqd/7kFCzjhSGFo=; b=Oag1rfNeIgHVtt+QaIK8N/vX7aPjhqVLQLFmx5nonrXo1IqVh4byJoocWifDiV3jVx G/yN9KOtBloqKQKMXIroixA7UmqdnYk0AdC+yZ7Yom/cmlprw9eeLNkh2nOJLF2ITxwm fppRwb3wmF5YGiQD0DI5Th3UW061BYml9eGRLEQJiyCW3J2ulsELt44fcMHyXrd8yaXN Jl1FrqJjB5V6vt6fu0z7VrlvdjpAYj7YcIuW0kOlDN0OIqcUIGeuFQsj8Tq4ZxOtLnIB 8xTPUNmOVzOlxsu9XM4dxZFH2MuKeq18oV2BGJqdgJ1F9bvKEmqiZCc4uQLzIszO/MFs AdFw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b="gxbrs/q0"; 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 w6-v6si14598894qkd.167.2018.07.09.10.33.26 for (version=TLS1 cipher=AES128-SHA bits=128/128); Mon, 09 Jul 2018 10:33:26 -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="gxbrs/q0"; 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]:43606 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fca2Q-0000JL-1D for patch@linaro.org; Mon, 09 Jul 2018 13:33:26 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44239) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fca2D-0000H5-QV for grub-devel@gnu.org; Mon, 09 Jul 2018 13:33:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fca29-0002fE-R8 for grub-devel@gnu.org; Mon, 09 Jul 2018 13:33:13 -0400 Received: from mail-wr1-x443.google.com ([2a00:1450:4864:20::443]:45228) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fca29-0002eh-Dw for grub-devel@gnu.org; Mon, 09 Jul 2018 13:33:09 -0400 Received: by mail-wr1-x443.google.com with SMTP id u7-v6so11824072wrn.12 for ; Mon, 09 Jul 2018 10:33:08 -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; bh=DBPBZUKCPvYkyenaC4+EawWRcT4Ddez9CtMdw9okrxU=; b=gxbrs/q0e+mRbaZOC/TIhcz+Leu1Qe5TQy/r2r2JQKxqxTMR/nOC9eGn5Knb1mR5ds DUMS5hCr+Zi1ufdnZbjEngHHXhFO5ZhuNUUHt3G/RrsG6NtroxvS8X/5qloVFn+w+oiA xtqp/ea1OPSQyWIFUAvjYt1YvKJRPYeEhtfac= 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; bh=DBPBZUKCPvYkyenaC4+EawWRcT4Ddez9CtMdw9okrxU=; b=h0J3/AClx1CLo28k6nxNeRz+3GVZeTHQMXigDVh806kuVj1kBOpZvcNpDD78Ao4exl inr14ZdInmVLut3/1bu7pa06UBuGPG9BjXunBai9cRpGz6mUT+YbL5b0H2F347cjjWuU 3cEqvxGKRLO2p1Z8sEN0Gv0z2uNHGi/wvDGnPtceu/iJ5J3igOO9PqR5IZSoCouJekWZ pX6SHHEPf9wkJZVYM3/Z3IVktyEXeDKCOtlGULZVKh3zayTZmMeODj0rXvaTrqwQLr1/ B1W4dHEJI8yzQpBjx4zxHJT+AEl9m8jEnd8cWSBQb6L4ZqT2Gs6F6cC4SGpXyXxlgcpU Gd8g== X-Gm-Message-State: APt69E2JSJlU+9Sfafy22ya82vQNYrdKCNkTXNh8gZz6IdRQsbtv9mxe XXXeVFuI68+Zgc3ERXLvETL1L/ZDgDo= X-Received: by 2002:adf:fc45:: with SMTP id e5-v6mr10298968wrs.157.1531157587351; Mon, 09 Jul 2018 10:33:07 -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 p3-v6sm27742988wrg.47.2018.07.09.10.33.06 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 09 Jul 2018 10:33:06 -0700 (PDT) From: Leif Lindholm To: grub-devel@gnu.org Subject: [PATCH v4 0/6] efi: arm linux loader unification and correctness Date: Mon, 9 Jul 2018 18:32:59 +0100 Message-Id: <20180709173305.17588-1-leif.lindholm@linaro.org> X-Mailer: git-send-email 2.11.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::443 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" The existing linux loader for 32-bit ARM is really only a piggy-back on the U-Boot loader, and for UEFI it's entirely possible to reuse the same loader across multiple architectures. This set will stop the ability to boot non-efistub kernels on arm-efi, but that has really only ever worked by luck. Also, both arm and arm64 have certain requirements with regards to placement of the initrd, which weren't honored by the existing loader - leading to theoretical issues on arm and some very observable ones on arm64 systems with large amounts of RAM or large holes in the memory map. So ensure the unified loader respects these requirements. Changes since v3: - Reformatted grub_efi_get_ram_base() based on feedback. - Renamed grub_efi_linux_* functions grub_armxx_efi_linux_*, and made the Linux magic macro naming match x86. - Clarified commit message for 4/6. - Relocated the comment and macros for initrd allocation function. Changes since v2: It would be difficult to provide a linear history of this set, but the main change since v2 is the renaming/refactoring of linux headers to be included for multiple architectures in a single source file (which was actually submitted as a separate set), and the follow-on changes this required for the unified apis. Leif Lindholm (6): efi: add central copy of grub_efi_find_mmap_size efi: add grub_efi_get_ram_base() function for arm64 arm64 linux loader: rename functions and macros and move to common headers arm/efi: switch to arm64 linux loader arm: delete unused efi support from loader/arm efi: restrict arm/arm64 linux loader initrd placement grub-core/Makefile.am | 1 - grub-core/Makefile.core.def | 7 +- grub-core/kern/arm/efi/misc.c | 202 -------------------------------------- grub-core/kern/efi/mm.c | 51 ++++++++++ grub-core/loader/arm/linux.c | 28 ------ grub-core/loader/arm64/linux.c | 53 ++++++++-- grub-core/loader/arm64/xen_boot.c | 10 +- include/grub/arm/efi/loader.h | 26 ----- include/grub/arm/linux.h | 21 +--- include/grub/arm64/linux.h | 9 +- include/grub/efi/efi.h | 6 ++ 11 files changed, 120 insertions(+), 294 deletions(-) delete mode 100644 grub-core/kern/arm/efi/misc.c delete mode 100644 include/grub/arm/efi/loader.h -- 2.11.0 _______________________________________________ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel