Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

efi/arm64: efistub: Move shared dependencies to <asm/efi.h>

This moves definitions depended upon both by code under arch/arm64/boot
and under drivers/firmware/efi to <asm/efi.h>. This is in preparation of
turning the stub code under drivers/firmware/efi into a static library.

Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Matt Fleming <matt.fleming@intel.com>

authored by

Ard Biesheuvel and committed by
Matt Fleming
a13b0077 f23cf8bd

+13 -10
+12
arch/arm64/include/asm/efi.h
··· 32 32 kernel_neon_end(); \ 33 33 }) 34 34 35 + /* arch specific definitions used by the stub code */ 36 + 37 + /* 38 + * AArch64 requires the DTB to be 8-byte aligned in the first 512MiB from 39 + * start of kernel and may not cross a 2MiB boundary. We set alignment to 40 + * 2MiB so we know it won't cross a 2MiB boundary. 41 + */ 42 + #define EFI_FDT_ALIGN SZ_2M /* used by allocate_new_fdt_and_exit_boot() */ 43 + #define MAX_FDT_OFFSET SZ_512M 44 + 45 + #define efi_call_early(f, ...) sys_table_arg->boottime->f(__VA_ARGS__) 46 + 35 47 #endif /* _ASM_EFI_H */
+1 -10
arch/arm64/kernel/efi-stub.c
··· 10 10 * 11 11 */ 12 12 #include <linux/efi.h> 13 + #include <asm/efi.h> 13 14 #include <linux/libfdt.h> 14 15 #include <asm/sections.h> 15 - 16 - /* 17 - * AArch64 requires the DTB to be 8-byte aligned in the first 512MiB from 18 - * start of kernel and may not cross a 2MiB boundary. We set alignment to 19 - * 2MiB so we know it won't cross a 2MiB boundary. 20 - */ 21 - #define EFI_FDT_ALIGN SZ_2M /* used by allocate_new_fdt_and_exit_boot() */ 22 - #define MAX_FDT_OFFSET SZ_512M 23 - 24 - #define efi_call_early(f, ...) sys_table_arg->boottime->f(__VA_ARGS__) 25 16 26 17 static void efi_char16_printk(efi_system_table_t *sys_table_arg, 27 18 efi_char16_t *str);