summaryrefslogtreecommitdiffstats
path: root/include/linux/efi.h
diff options
context:
space:
mode:
authorTom Lendacky <thomas.lendacky@amd.com>2017-07-17 17:10:13 -0400
committerIngo Molnar <mingo@kernel.org>2017-07-18 05:38:01 -0400
commita19d66c56af1c52b8b463bf94d21116ae8c1aa5a (patch)
treebc629a18edbf08a214760831ba523ed913081e83 /include/linux/efi.h
parentd68baa3fa6e4d703fd0c7954ee5c739789e7242f (diff)
efi: Add an EFI table address match function
Add a function that will determine if a supplied physical address matches the address of an EFI table. Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com> Reviewed-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Matt Fleming <matt@codeblueprint.co.uk> Reviewed-by: Borislav Petkov <bp@suse.de> Cc: Alexander Potapenko <glider@google.com> Cc: Andrey Ryabinin <aryabinin@virtuozzo.com> Cc: Andy Lutomirski <luto@kernel.org> Cc: Arnd Bergmann <arnd@arndb.de> Cc: Borislav Petkov <bp@alien8.de> Cc: Brijesh Singh <brijesh.singh@amd.com> Cc: Dave Young <dyoung@redhat.com> Cc: Dmitry Vyukov <dvyukov@google.com> Cc: Jonathan Corbet <corbet@lwn.net> Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Cc: Larry Woodman <lwoodman@redhat.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Michael S. Tsirkin <mst@redhat.com> Cc: Paolo Bonzini <pbonzini@redhat.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Radim Krčmář <rkrcmar@redhat.com> Cc: Rik van Riel <riel@redhat.com> Cc: Toshimitsu Kani <toshi.kani@hpe.com> Cc: kasan-dev@googlegroups.com Cc: kvm@vger.kernel.org Cc: linux-arch@vger.kernel.org Cc: linux-doc@vger.kernel.org Cc: linux-efi@vger.kernel.org Cc: linux-mm@kvack.org Link: http://lkml.kernel.org/r/e1e06441d80f44776df391e0e4cb485b345b7518.1500319216.git.thomas.lendacky@amd.com Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'include/linux/efi.h')
-rw-r--r--include/linux/efi.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/linux/efi.h b/include/linux/efi.h
index 8269bcb8ccf7..8e24f099bd3f 100644
--- a/include/linux/efi.h
+++ b/include/linux/efi.h
@@ -1091,6 +1091,8 @@ static inline bool efi_enabled(int feature)
1091 return test_bit(feature, &efi.flags) != 0; 1091 return test_bit(feature, &efi.flags) != 0;
1092} 1092}
1093extern void efi_reboot(enum reboot_mode reboot_mode, const char *__unused); 1093extern void efi_reboot(enum reboot_mode reboot_mode, const char *__unused);
1094
1095extern bool efi_is_table_address(unsigned long phys_addr);
1094#else 1096#else
1095static inline bool efi_enabled(int feature) 1097static inline bool efi_enabled(int feature)
1096{ 1098{
@@ -1104,6 +1106,11 @@ efi_capsule_pending(int *reset_type)
1104{ 1106{
1105 return false; 1107 return false;
1106} 1108}
1109
1110static inline bool efi_is_table_address(unsigned long phys_addr)
1111{
1112 return false;
1113}
1107#endif 1114#endif
1108 1115
1109extern int efi_status_to_err(efi_status_t status); 1116extern int efi_status_to_err(efi_status_t status);