efi/loongarch: Directly position the loaded image file
authorWang Yao <wangyao@lemote.com>
Tue, 19 Dec 2023 09:14:05 +0000 (17:14 +0800)
committerArd Biesheuvel <ardb@kernel.org>
Tue, 19 Dec 2023 10:16:37 +0000 (11:16 +0100)
commit174a0c565cea74a7811ff79fbee1b70247570ade
tree43bd475793158498b6860edb6aa905f93e866f8e
parenta42da7f0f94eaac5beae0da7da51ce9c30352b7e
efi/loongarch: Directly position the loaded image file

The use of the 'kernel_offset' variable to position the image file that
has been loaded by UEFI or GRUB is unnecessary, because we can directly
position the loaded image file through using the image_base field of the
efi_loaded_image struct provided by UEFI.

Replace kernel_offset with image_base to position the image file that has
been loaded by UEFI or GRUB.

Signed-off-by: Wang Yao <wangyao@lemote.com>
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
arch/loongarch/include/asm/efi.h
arch/loongarch/kernel/head.S
arch/loongarch/kernel/image-vars.h
arch/loongarch/kernel/vmlinux.lds.S
drivers/firmware/efi/libstub/loongarch-stub.c
drivers/firmware/efi/libstub/loongarch-stub.h [new file with mode: 0644]
drivers/firmware/efi/libstub/loongarch.c