mbox series

[v4,0/6] efi: arm linux loader unification and correctness

Message ID 20180709173305.17588-1-leif.lindholm@linaro.org
Headers show
Series efi: arm linux loader unification and correctness | expand

Message

Leif Lindholm July 9, 2018, 5:32 p.m. UTC
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

Comments

Daniel Kiper July 10, 2018, 12:20 p.m. UTC | #1
On Mon, Jul 09, 2018 at 06:32:59PM +0100, Leif Lindholm wrote:
> 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.


Entire patchset LGTM. If there are no objections I will apply
it in a week or so.

Daniel

_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel