summaryrefslogtreecommitdiff
path: root/arch/loongarch/include
diff options
context:
space:
mode:
authorArd Biesheuvel <ardb@kernel.org>2022-10-12 15:57:32 +0300
committerArd Biesheuvel <ardb@kernel.org>2022-11-09 14:42:03 +0300
commit895bc3a135ffe9475de04b30e274f57a176cd3ef (patch)
tree095e1bef70d74e863ba6bd043e4f3dc60e701d19 /arch/loongarch/include
parent1f1ba325a23df6739b6b5e52f40ec1aa228108b2 (diff)
downloadlinux-895bc3a135ffe9475de04b30e274f57a176cd3ef.tar.xz
efi: libstub: Factor out min alignment and preferred kernel load address
Factor out the expressions that describe the preferred placement of the loaded image as well as the minimum alignment so we can reuse them in the decompressor. Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Diffstat (limited to 'arch/loongarch/include')
-rw-r--r--arch/loongarch/include/asm/efi.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/loongarch/include/asm/efi.h b/arch/loongarch/include/asm/efi.h
index 60d6a170c18d..5a470c8d2bbc 100644
--- a/arch/loongarch/include/asm/efi.h
+++ b/arch/loongarch/include/asm/efi.h
@@ -24,4 +24,11 @@ static inline unsigned long efi_get_max_initrd_addr(unsigned long image_addr)
return ULONG_MAX;
}
+static inline unsigned long efi_get_kimg_min_align(void)
+{
+ return SZ_2M;
+}
+
+#define EFI_KIMG_PREFERRED_ADDRESS PHYSADDR(VMLINUX_LOAD_ADDRESS)
+
#endif /* _ASM_LOONGARCH_EFI_H */