Commit 0a7ec8f6 authored by Leif Lindholm's avatar Leif Lindholm Committed by Colin Watson

arm/efi: Switch to arm64 linux loader

The arm64 and arm linux kernel EFI-stub support presents pretty much
identical interfaces, so the same linux loader source can be used for
both architectures.

Switch 32-bit ARM UEFI platforms over to the existing EFI-stub aware
loader initially developed for arm64.

This *WILL* stop non-efistub Linux kernels from booting on arm-efi.
Signed-off-by: default avatarLeif Lindholm <leif.lindholm@linaro.org>
Reviewed-by: default avatarDaniel Kiper <daniel.kiper@oracle.com>

Origin: upstream, https://git.savannah.gnu.org/cgit/grub.git/commit/?id=d0c070179d4d78c297364e41ece54fd7755c4b58
Bug-Debian: https://bugs.debian.org/907596
Bug-Debian: https://bugs.debian.org/909420
Last-Update: 2018-12-06

Patch-Name: arm-efi-switch-to-arm64-linux-loader.patch
parent 99829bac
......@@ -211,7 +211,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;
......@@ -1678,7 +1677,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;
......@@ -1687,7 +1688,7 @@ module = {
module = {
name = fdt;
arm64 = loader/efi/fdt.c;
efi = loader/efi/fdt.c;
common = lib/fdt.c;
enable = fdt;
};
......
......@@ -584,7 +584,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)
{
......
......@@ -34,6 +34,11 @@ struct linux_arm_kernel_header {
grub_uint32_t hdr_offset;
};
#if defined(__arm__)
# define GRUB_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 <grub/uboot/uboot.h>
# define LINUX_ADDRESS (start_of_ram + 0x8000)
......
......@@ -95,8 +95,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/cpu/linux.h>
grub_err_t grub_armxx_efi_linux_check_image(struct linux_armxx_kernel_header *lh);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment