diff options
author | Mark Rutland <mark.rutland@arm.com> | 2017-07-14 16:54:36 +0200 |
---|---|---|
committer | Mark Rutland <mark.rutland@arm.com> | 2017-08-15 19:35:32 +0200 |
commit | 170976bcab073870af059b5e848c80689bd5e931 (patch) | |
tree | 92a1999396756a9b9c5c238de904989216e8fdc4 /arch/arm64/include/asm/efi.h | |
parent | arm64: move SEGMENT_ALIGN to <asm/memory.h> (diff) | |
download | linux-170976bcab073870af059b5e848c80689bd5e931.tar.xz linux-170976bcab073870af059b5e848c80689bd5e931.zip |
efi/arm64: add EFI_KIMG_ALIGN
The EFI stub is intimately coupled with the kernel, and takes advantage
of this by relocating the kernel at a weaker alignment than the
documented boot protocol mandates.
However, it does so by assuming it can align the kernel to the segment
alignment, and assumes that this is 64K. In subsequent patches, we'll
have to consider other details to determine this de-facto alignment
constraint.
This patch adds a new EFI_KIMG_ALIGN definition that will track the
kernel's de-facto alignment requirements. Subsequent patches will modify
this as required.
Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Reviewed-by: Will Deacon <will.deacon@arm.com>
Tested-by: Laura Abbott <labbott@redhat.com>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: James Morse <james.morse@arm.com>
Cc: Matt Fleming <matt@codeblueprint.co.uk>
Diffstat (limited to 'arch/arm64/include/asm/efi.h')
-rw-r--r-- | arch/arm64/include/asm/efi.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/arm64/include/asm/efi.h b/arch/arm64/include/asm/efi.h index 8f3043aba873..0e8cc3b85bb8 100644 --- a/arch/arm64/include/asm/efi.h +++ b/arch/arm64/include/asm/efi.h @@ -4,6 +4,7 @@ #include <asm/boot.h> #include <asm/cpufeature.h> #include <asm/io.h> +#include <asm/memory.h> #include <asm/mmu_context.h> #include <asm/neon.h> #include <asm/ptrace.h> @@ -48,6 +49,8 @@ int efi_set_mapping_permissions(struct mm_struct *mm, efi_memory_desc_t *md); */ #define EFI_FDT_ALIGN SZ_2M /* used by allocate_new_fdt_and_exit_boot() */ +#define EFI_KIMG_ALIGN SEGMENT_ALIGN + /* on arm64, the FDT may be located anywhere in system RAM */ static inline unsigned long efi_get_max_fdt_addr(unsigned long dram_base) { |