summaryrefslogtreecommitdiff
path: root/arch/x86/boot/compressed/misc.h
diff options
context:
space:
mode:
authorMichael Roth <michael.roth@amd.com>2022-02-24 10:56:07 -0600
committerBorislav Petkov <bp@suse.de>2022-04-06 17:07:19 +0200
commitdee602dd5d1489b5aa4651c561dfbe90eaee1589 (patch)
treeb18372999eb9b221d6e08de6baaf69a4298a4233 /arch/x86/boot/compressed/misc.h
parent61c14ceda8405f37545a0983d6b9bc45c6236793 (diff)
downloadlwn-dee602dd5d1489b5aa4651c561dfbe90eaee1589.tar.gz
lwn-dee602dd5d1489b5aa4651c561dfbe90eaee1589.zip
x86/compressed/acpi: Move EFI vendor table lookup to helper
Future patches for SEV-SNP-validated CPUID will also require early parsing of the EFI configuration. Incrementally move the related code into a set of helpers that can be re-used for that purpose. [ bp: Unbreak unnecessarily broken lines. ] Signed-off-by: Michael Roth <michael.roth@amd.com> Signed-off-by: Brijesh Singh <brijesh.singh@amd.com> Signed-off-by: Borislav Petkov <bp@suse.de> Link: https://lore.kernel.org/r/20220307213356.2797205-28-brijesh.singh@amd.com
Diffstat (limited to 'arch/x86/boot/compressed/misc.h')
-rw-r--r--arch/x86/boot/compressed/misc.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/arch/x86/boot/compressed/misc.h b/arch/x86/boot/compressed/misc.h
index 8815af092a10..ba538af37e90 100644
--- a/arch/x86/boot/compressed/misc.h
+++ b/arch/x86/boot/compressed/misc.h
@@ -23,6 +23,7 @@
#include <linux/screen_info.h>
#include <linux/elf.h>
#include <linux/io.h>
+#include <linux/efi.h>
#include <asm/page.h>
#include <asm/boot.h>
#include <asm/bootparam.h>
@@ -188,6 +189,10 @@ enum efi_type efi_get_type(struct boot_params *bp);
unsigned long efi_get_system_table(struct boot_params *bp);
int efi_get_conf_table(struct boot_params *bp, unsigned long *cfg_tbl_pa,
unsigned int *cfg_tbl_len);
+unsigned long efi_find_vendor_table(struct boot_params *bp,
+ unsigned long cfg_tbl_pa,
+ unsigned int cfg_tbl_len,
+ efi_guid_t guid);
#else
static inline enum efi_type efi_get_type(struct boot_params *bp)
{
@@ -205,6 +210,14 @@ static inline int efi_get_conf_table(struct boot_params *bp,
{
return -ENOENT;
}
+
+static inline unsigned long efi_find_vendor_table(struct boot_params *bp,
+ unsigned long cfg_tbl_pa,
+ unsigned int cfg_tbl_len,
+ efi_guid_t guid)
+{
+ return 0;
+}
#endif /* CONFIG_EFI */
#endif /* BOOT_COMPRESSED_MISC_H */