efi/libstub: move TPM related prototypes into efistub.h
authorArd Biesheuvel <ardb@kernel.org>
Mon, 2 Nov 2020 10:51:10 +0000 (11:51 +0100)
committerArd Biesheuvel <ardb@kernel.org>
Tue, 19 Jan 2021 16:57:15 +0000 (17:57 +0100)
Move TPM related definitions that are only used in the EFI stub into
efistub.h, which is a local header.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
drivers/firmware/efi/libstub/efistub.h
include/linux/efi.h

index 2b7438ba1fbc7bad54f0a14ada59e579e003f811..cde0a2ef507d9853e7b9a2c1675e181fc7cd993b 100644 (file)
@@ -849,4 +849,13 @@ void efi_handle_post_ebs_state(void);
 
 enum efi_secureboot_mode efi_get_secureboot(void);
 
+#ifdef CONFIG_RESET_ATTACK_MITIGATION
+void efi_enable_reset_attack_mitigation(void);
+#else
+static inline void
+efi_enable_reset_attack_mitigation(void) { }
+#endif
+
+void efi_retrieve_tpm2_eventlog(void);
+
 #endif
index 2537a246c2d6dcf681157d2a15b0bef847d35d6d..8710f5710c1d1a5d2973455fc1c97da4eaba5e41 100644 (file)
@@ -1104,13 +1104,6 @@ enum efi_secureboot_mode efi_get_secureboot_mode(efi_get_variable_t *get_var)
        return efi_secureboot_mode_enabled;
 }
 
-#ifdef CONFIG_RESET_ATTACK_MITIGATION
-void efi_enable_reset_attack_mitigation(void);
-#else
-static inline void
-efi_enable_reset_attack_mitigation(void) { }
-#endif
-
 #ifdef CONFIG_EFI_EMBEDDED_FIRMWARE
 void efi_check_for_embedded_firmwares(void);
 #else
@@ -1119,8 +1112,6 @@ static inline void efi_check_for_embedded_firmwares(void) { }
 
 efi_status_t efi_random_get_seed(void);
 
-void efi_retrieve_tpm2_eventlog(void);
-
 /*
  * Arch code can implement the following three template macros, avoiding
  * reptition for the void/non-void return cases of {__,}efi_call_virt():