From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1fca2H-0000LY-Hz for mharc-grub-devel@gnu.org; Mon, 09 Jul 2018 13:33:17 -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-Google-Smtp-Source: AAOMgpdzaTIxRXd8H7HUotY9i+xUgLdFaD4n9KjVSHcpXvPdnOABLl/L+kenYq7RTWT/UhSdIIZOvA== 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 Cc: Daniel Kiper 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: , X-List-Received-Date: Mon, 09 Jul 2018 17:33:14 -0000 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