Skip to content

Commit 62956be

Browse files
committed
efi/libstub: arm: Omit arch specific config table matching array on arm64
On arm64, the EFI stub is built into the kernel proper, and so the stub can refer to its symbols directly. Therefore, the practice of using EFI configuration tables to pass information between them is never needed, so we can omit any code consuming such tables when building for arm64. Signed-off-by: Ard Biesheuvel <[email protected]> Reviewed-by: Leif Lindholm <[email protected]>
1 parent 41d90b0 commit 62956be

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

drivers/firmware/efi/arm-init.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,8 @@ static void __init init_screen_info(void)
6262
{
6363
struct screen_info *si;
6464

65-
if (screen_info_table != EFI_INVALID_TABLE_ADDR) {
65+
if (IS_ENABLED(CONFIG_ARM) &&
66+
screen_info_table != EFI_INVALID_TABLE_ADDR) {
6667
si = early_memremap_ro(screen_info_table, sizeof(*si));
6768
if (!si) {
6869
pr_err("Could not map screen_info config table\n");
@@ -116,7 +117,8 @@ static int __init uefi_init(u64 efi_system_table)
116117
goto out;
117118
}
118119
retval = efi_config_parse_tables(config_tables, systab->nr_tables,
119-
arch_tables);
120+
IS_ENABLED(CONFIG_ARM) ? arch_tables
121+
: NULL);
120122

121123
early_memunmap(config_tables, table_size);
122124
out:

0 commit comments

Comments
 (0)