efi/loongarch: Use load address to calculate kernel entry address
authorWang Yao <wangyao@lemote.com>
Wed, 6 Dec 2023 00:24:27 +0000 (08:24 +0800)
committerArd Biesheuvel <ardb@kernel.org>
Mon, 11 Dec 2023 10:18:26 +0000 (11:18 +0100)
commit271f2a4a9576b87ed1f8584909d6d270039e52ea
tree6b39c0351d1ed435de6ec5fba4a048bb738d7997
parent01b1e3ca0e5ce47bbae8217d47376ad01b331b07
efi/loongarch: Use load address to calculate kernel entry address

The efi_relocate_kernel() may load the PIE kernel to anywhere, the
loaded address may not be equal to link address or
EFI_KIMG_PREFERRED_ADDRESS.

Acked-by: Huacai Chen <chenhuacai@loongson.cn>
Signed-off-by: Wang Yao <wangyao@lemote.com>
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
arch/loongarch/include/asm/efi.h
drivers/firmware/efi/libstub/loongarch-stub.c
drivers/firmware/efi/libstub/loongarch.c