]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
efi/arm*: Perform hardware compatibility check
authorArd Biesheuvel <ard.biesheuvel@linaro.org>
Wed, 17 Feb 2016 12:36:03 +0000 (12:36 +0000)
committerIngo Molnar <mingo@kernel.org>
Mon, 22 Feb 2016 07:26:27 +0000 (08:26 +0100)
Before proceeding with relocating the kernel and parsing the command line,
insert a call to check_platform_features() to allow an arch specific check
to be performed whether the current kernel can execute on the current
hardware.

Tested-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Matt Fleming <matt@codeblueprint.co.uk>
Reviewed-by: Jeremy Linton <jeremy.linton@arm.com>
Acked-by: Mark Rutland <mark.rutland@arm.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-efi@vger.kernel.org
Link: http://lkml.kernel.org/r/1455712566-16727-11-git-send-email-matt@codeblueprint.co.uk
Signed-off-by: Ingo Molnar <mingo@kernel.org>
drivers/firmware/efi/libstub/arm-stub.c
drivers/firmware/efi/libstub/efistub.h

index 3397902e4040a30f566ff4b84555f17d7150d8f8..6086a874fa3c2f906bec20bf1d4a1c4885ebce82 100644 (file)
@@ -190,6 +190,10 @@ unsigned long efi_entry(void *handle, efi_system_table_t *sys_table,
 
        pr_efi(sys_table, "Booting Linux Kernel...\n");
 
+       status = check_platform_features(sys_table);
+       if (status != EFI_SUCCESS)
+               goto fail;
+
        /*
         * Get a handle to the loaded image protocol.  This is used to get
         * information about the running image, such as size and the command
index 86ff7bfa6acedbf7229d790747df37a3f98249c4..981c6035ce09d88d6c22c01e3ccef72493335c5e 100644 (file)
@@ -53,4 +53,6 @@ void efi_get_virtmap(efi_memory_desc_t *memory_map, unsigned long map_size,
                     unsigned long desc_size, efi_memory_desc_t *runtime_map,
                     int *count);
 
+efi_status_t check_platform_features(efi_system_table_t *sys_table_arg);
+
 #endif