From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751960AbcBWJZO (ORCPT ); Tue, 23 Feb 2016 04:25:14 -0500 Received: from terminus.zytor.com ([198.137.202.10]:58000 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754652AbcBWJJm (ORCPT ); Tue, 23 Feb 2016 04:09:42 -0500 Date: Mon, 22 Feb 2016 04:16:31 -0800 From: =?UTF-8?B?dGlwLWJvdCBmb3IgQXJkIEJpZXNoZXV2ZWwgPHRpcGJvdEB6eXRvci5jb20+?=@zytor.com Message-ID: Cc: mingo@kernel.org, mark.rutland@arm.com, hpa@zytor.com, linux-kernel@vger.kernel.org, peterz@infradead.org, jeremy.linton@arm.com, tglx@linutronix.de, matt@codeblueprint.co.uk, suzuki.poulose@arm.com, ard.biesheuvel@linaro.org, torvalds@linux-foundation.org Reply-To: ard.biesheuvel@linaro.org, torvalds@linux-foundation.org, suzuki.poulose@arm.com, matt@codeblueprint.co.uk, tglx@linutronix.de, jeremy.linton@arm.com, peterz@infradead.org, linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@kernel.org, mark.rutland@arm.com In-Reply-To: <1455712566-16727-11-git-send-email-matt@codeblueprint.co.uk> References: <1455712566-16727-11-git-send-email-matt@codeblueprint.co.uk> To: =?UTF-8?B?bGludXgtdGlwLWNvbW1pdHNAdmdlci5rZXJuZWwub3Jn?=@zytor.com Subject: =?UTF-8?B?W3RpcDplZmkvY29yZV0gZWZpL2FybSo6IFBlcmZvcm0gaGFyZHdhcmUgY29tcGE=?= =?UTF-8?B?dGliaWxpdHkgY2hlY2s=?= Git-Commit-ID: =?UTF-8?B?YjlkNjc2OWI1Njc4ZGJkNmNiMzI4ZDIwNzE2NTYxZDM1YjJiMTUxMA==?= X-Mailer: =?UTF-8?B?dGlwLWdpdC1sb2ctZGFlbW9u?= Robot-ID: =?UTF-8?B?PHRpcC1ib3QuZ2l0Lmtlcm5lbC5vcmc+?= Robot-Unsubscribe: =?UTF-8?B?Q29udGFjdCA8bWFpbHRvOmhwYUBrZXJuZWwub3JnPiB0byBnZXQgYmxhY2tsaXM=?= =?UTF-8?B?dGVkIGZyb20gdGhlc2UgZW1haWxz?= MIME-Version: =?UTF-8?B?MS4w?= Content-Transfer-Encoding: =?UTF-8?B?OGJpdA==?= Content-Type: =?UTF-8?B?dGV4dC9wbGFpbjsgY2hhcnNldD1VVEYtOA==?= Content-Disposition: =?UTF-8?B?aW5saW5l?= Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: b9d6769b5678dbd6cb328d20716561d35b2b1510 Gitweb: http://git.kernel.org/tip/b9d6769b5678dbd6cb328d20716561d35b2b1510 Author: Ard Biesheuvel AuthorDate: Wed, 17 Feb 2016 12:36:03 +0000 Committer: Ingo Molnar CommitDate: Mon, 22 Feb 2016 08:26:27 +0100 efi/arm*: Perform hardware compatibility check 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 Signed-off-by: Ard Biesheuvel Signed-off-by: Matt Fleming Reviewed-by: Jeremy Linton Acked-by: Mark Rutland Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner 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 --- drivers/firmware/efi/libstub/arm-stub.c | 4 ++++ drivers/firmware/efi/libstub/efistub.h | 2 ++ 2 files changed, 6 insertions(+) diff --git a/drivers/firmware/efi/libstub/arm-stub.c b/drivers/firmware/efi/libstub/arm-stub.c index 3397902..6086a87 100644 --- a/drivers/firmware/efi/libstub/arm-stub.c +++ b/drivers/firmware/efi/libstub/arm-stub.c @@ -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 diff --git a/drivers/firmware/efi/libstub/efistub.h b/drivers/firmware/efi/libstub/efistub.h index 86ff7bf..981c603 100644 --- a/drivers/firmware/efi/libstub/efistub.h +++ b/drivers/firmware/efi/libstub/efistub.h @@ -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