diff options
author | Roy Franz <roy.franz@linaro.org> | 2015-09-24 06:17:54 +0300 |
---|---|---|
committer | ard <ard.biesheuvel@linaro.org> | 2015-12-14 12:38:21 +0300 |
commit | 81a0bc39ea1960bbf8ece6a895d7cfd2d9efa28a (patch) | |
tree | 58f4c5c73cc4292b242dce2e0018511f9e18e39e /arch/arm/include/asm/efi.h | |
parent | da58fb6571bf40e5b2287d6aa3bbca04965f5677 (diff) | |
download | linux-81a0bc39ea1960bbf8ece6a895d7cfd2d9efa28a.tar.xz |
ARM: add UEFI stub support
This patch adds EFI stub support for the ARM Linux kernel.
The EFI stub operates similarly to the x86 and arm64 stubs: it is a
shim between the EFI firmware and the normal zImage entry point, and
sets up the environment that the zImage is expecting. This includes
optionally loading the initrd and device tree from the system partition
based on the kernel command line.
Signed-off-by: Roy Franz <roy.franz@linaro.org>
Tested-by: Ryan Harkin <ryan.harkin@linaro.org>
Reviewed-by: Matt Fleming <matt@codeblueprint.co.uk>
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Diffstat (limited to 'arch/arm/include/asm/efi.h')
-rw-r--r-- | arch/arm/include/asm/efi.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/arch/arm/include/asm/efi.h b/arch/arm/include/asm/efi.h index c91e330616ad..e0eea72deb87 100644 --- a/arch/arm/include/asm/efi.h +++ b/arch/arm/include/asm/efi.h @@ -57,4 +57,27 @@ void efi_virtmap_unload(void); #define efi_init() #endif /* CONFIG_EFI */ +/* arch specific definitions used by the stub code */ + +#define efi_call_early(f, ...) sys_table_arg->boottime->f(__VA_ARGS__) + +/* + * A reasonable upper bound for the uncompressed kernel size is 32 MBytes, + * so we will reserve that amount of memory. We have no easy way to tell what + * the actuall size of code + data the uncompressed kernel will use. + * If this is insufficient, the decompressor will relocate itself out of the + * way before performing the decompression. + */ +#define MAX_UNCOMP_KERNEL_SIZE SZ_32M + +/* + * The kernel zImage should preferably be located between 32 MB and 128 MB + * from the base of DRAM. The min address leaves space for a maximal size + * uncompressed image, and the max address is due to how the zImage decompressor + * picks a destination address. + */ +#define ZIMAGE_OFFSET_LIMIT SZ_128M +#define MIN_ZIMAGE_OFFSET MAX_UNCOMP_KERNEL_SIZE +#define MAX_FDT_OFFSET ZIMAGE_OFFSET_LIMIT + #endif /* _ASM_ARM_EFI_H */ |