]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
efi/arm/arm64: Add missing assignment of efi.config_table
authorArd Biesheuvel <ard.biesheuvel@linaro.org>
Fri, 18 Aug 2017 19:49:38 +0000 (20:49 +0100)
committerIngo Molnar <mingo@kernel.org>
Mon, 21 Aug 2017 07:43:49 +0000 (09:43 +0200)
The ARM EFI init code never assigns the config_table member of the
efi struct, which means the sysfs device node is missing, and other
in-kernel users will not work correctly. So add the missing assignment.

Note that, for now, the runtime and fw_vendor members are still
omitted. This is deliberate: exposing physical addresses via sysfs nodes
encourages behavior that we would like to avoid on ARM (given how it is
more finicky about using correct memory attributes when mapping memory
in userland that may be mapped by the kernel already as well).

Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Matt Fleming <matt@codeblueprint.co.uk>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-efi@vger.kernel.org
Link: http://lkml.kernel.org/r/20170818194947.19347-6-ard.biesheuvel@linaro.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
drivers/firmware/efi/arm-init.c

index 0aa4ce7b4fbba762ba26dd65338f23a123191e30..80d1a885def5c2dd8bd15591bcc7c62d9b2e3b8c 100644 (file)
@@ -145,6 +145,9 @@ static int __init uefi_init(void)
                                         sizeof(efi_config_table_t),
                                         arch_tables);
 
+       if (!retval)
+               efi.config_table = (unsigned long)efi.systab->tables;
+
        early_memunmap(config_tables, table_size);
 out:
        early_memunmap(efi.systab,  sizeof(efi_system_table_t));