* [PATCH] efi: payload: image use new CONFIG_ARM64 symbol
@ 2024-09-20 9:49 Ahmad Fatoum
2024-09-27 11:25 ` Sascha Hauer
0 siblings, 1 reply; 2+ messages in thread
From: Ahmad Fatoum @ 2024-09-20 9:49 UTC (permalink / raw)
To: barebox; +Cc: Ahmad Fatoum
CONFIG_ARM64 was added as an alternative to CONFIG_CPU_V8 as encountering
the latter in generic code is confusing for users not familiar with ARM.
EFI payload support was one such generic place, so let's replace the
CONFIG_CPU_v8 instance there with the new symbol.
The if clause is moved to keep the order elsewhere in the file, where
x86 checks are done before those for ARM. Both can't be active at the
same time, so no functional change expected.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
efi/payload/image.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/efi/payload/image.c b/efi/payload/image.c
index 6a41338f2a2f..70b57360c99d 100644
--- a/efi/payload/image.c
+++ b/efi/payload/image.c
@@ -163,7 +163,7 @@ static bool is_linux_image(enum filetype filetype, const void *base)
hdr->boot_flag == 0xAA55 && hdr->header == 0x53726448)
return true;
- if (IS_ENABLED(CONFIG_CPU_V8) &&
+ if (IS_ENABLED(CONFIG_ARM64) &&
filetype == filetype_arm64_efi_linux_image)
return true;
@@ -367,12 +367,12 @@ static int efi_register_image_handler(void)
register_image_handler(&efi_handle_tr);
binfmt_register(&binfmt_efi_hook);
- if (IS_ENABLED(CONFIG_CPU_V8))
- binfmt_register(&binfmt_arm64_efi_hook);
-
if (IS_ENABLED(CONFIG_X86))
register_image_handler(&non_efi_handle_linux_x86);
+ if (IS_ENABLED(CONFIG_ARM64))
+ binfmt_register(&binfmt_arm64_efi_hook);
+
return 0;
}
late_efi_initcall(efi_register_image_handler);
--
2.39.5
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-09-27 11:28 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-09-20 9:49 [PATCH] efi: payload: image use new CONFIG_ARM64 symbol Ahmad Fatoum
2024-09-27 11:25 ` Sascha Hauer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox