aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/boot/compressed/misc.h
diff options
context:
space:
mode:
authorMichael Roth <michael.roth@amd.com>2022-02-24 10:56:06 -0600
committerBorislav Petkov <bp@suse.de>2022-04-06 17:07:15 +0200
commit61c14ceda8405f37545a0983d6b9bc45c6236793 (patch)
tree8887f353afc3096b316f3c43487c89f55fdc54b3 /arch/x86/boot/compressed/misc.h
parentx86/compressed/acpi: Move EFI system table lookup to helper (diff)
downloadlinux-dev-61c14ceda8405f37545a0983d6b9bc45c6236793.tar.xz
linux-dev-61c14ceda8405f37545a0983d6b9bc45c6236793.zip
x86/compressed/acpi: Move EFI config 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: Remove superfluous zeroing of a stack variable. ] 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-27-brijesh.singh@amd.com
Diffstat (limited to 'arch/x86/boot/compressed/misc.h')
-rw-r--r--arch/x86/boot/compressed/misc.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/x86/boot/compressed/misc.h b/arch/x86/boot/compressed/misc.h
index b2acd3ac6525..8815af092a10 100644
--- a/arch/x86/boot/compressed/misc.h
+++ b/arch/x86/boot/compressed/misc.h
@@ -186,6 +186,8 @@ enum efi_type {
/* helpers for early EFI config table access */
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);
#else
static inline enum efi_type efi_get_type(struct boot_params *bp)
{
@@ -196,6 +198,13 @@ static inline unsigned long efi_get_system_table(struct boot_params *bp)
{
return 0;
}
+
+static inline int efi_get_conf_table(struct boot_params *bp,
+ unsigned long *cfg_tbl_pa,
+ unsigned int *cfg_tbl_len)
+{
+ return -ENOENT;
+}
#endif /* CONFIG_EFI */
#endif /* BOOT_COMPRESSED_MISC_H */