aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/efi.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/efi.h')
-rw-r--r--include/linux/efi.h46
1 files changed, 46 insertions, 0 deletions
diff --git a/include/linux/efi.h b/include/linux/efi.h
index 29fdf8029cf6..f5083aa72eae 100644
--- a/include/linux/efi.h
+++ b/include/linux/efi.h
@@ -475,6 +475,39 @@ typedef struct {
475 u64 get_all; 475 u64 get_all;
476} apple_properties_protocol_64_t; 476} apple_properties_protocol_64_t;
477 477
478typedef struct {
479 u32 get_capability;
480 u32 get_event_log;
481 u32 hash_log_extend_event;
482 u32 submit_command;
483 u32 get_active_pcr_banks;
484 u32 set_active_pcr_banks;
485 u32 get_result_of_set_active_pcr_banks;
486} efi_tcg2_protocol_32_t;
487
488typedef struct {
489 u64 get_capability;
490 u64 get_event_log;
491 u64 hash_log_extend_event;
492 u64 submit_command;
493 u64 get_active_pcr_banks;
494 u64 set_active_pcr_banks;
495 u64 get_result_of_set_active_pcr_banks;
496} efi_tcg2_protocol_64_t;
497
498typedef u32 efi_tcg2_event_log_format;
499
500typedef struct {
501 void *get_capability;
502 efi_status_t (*get_event_log)(efi_handle_t, efi_tcg2_event_log_format,
503 efi_physical_addr_t *, efi_physical_addr_t *, efi_bool_t *);
504 void *hash_log_extend_event;
505 void *submit_command;
506 void *get_active_pcr_banks;
507 void *set_active_pcr_banks;
508 void *get_result_of_set_active_pcr_banks;
509} efi_tcg2_protocol_t;
510
478/* 511/*
479 * Types and defines for EFI ResetSystem 512 * Types and defines for EFI ResetSystem
480 */ 513 */
@@ -625,6 +658,7 @@ void efi_native_runtime_setup(void);
625#define EFI_MEMORY_ATTRIBUTES_TABLE_GUID EFI_GUID(0xdcfa911d, 0x26eb, 0x469f, 0xa2, 0x20, 0x38, 0xb7, 0xdc, 0x46, 0x12, 0x20) 658#define EFI_MEMORY_ATTRIBUTES_TABLE_GUID EFI_GUID(0xdcfa911d, 0x26eb, 0x469f, 0xa2, 0x20, 0x38, 0xb7, 0xdc, 0x46, 0x12, 0x20)
626#define EFI_CONSOLE_OUT_DEVICE_GUID EFI_GUID(0xd3b36f2c, 0xd551, 0x11d4, 0x9a, 0x46, 0x00, 0x90, 0x27, 0x3f, 0xc1, 0x4d) 659#define EFI_CONSOLE_OUT_DEVICE_GUID EFI_GUID(0xd3b36f2c, 0xd551, 0x11d4, 0x9a, 0x46, 0x00, 0x90, 0x27, 0x3f, 0xc1, 0x4d)
627#define APPLE_PROPERTIES_PROTOCOL_GUID EFI_GUID(0x91bd12fe, 0xf6c3, 0x44fb, 0xa5, 0xb7, 0x51, 0x22, 0xab, 0x30, 0x3a, 0xe0) 660#define APPLE_PROPERTIES_PROTOCOL_GUID EFI_GUID(0x91bd12fe, 0xf6c3, 0x44fb, 0xa5, 0xb7, 0x51, 0x22, 0xab, 0x30, 0x3a, 0xe0)
661#define EFI_TCG2_PROTOCOL_GUID EFI_GUID(0x607f766c, 0x7455, 0x42be, 0x93, 0x0b, 0xe4, 0xd7, 0x6d, 0xb2, 0x72, 0x0f)
628 662
629#define EFI_IMAGE_SECURITY_DATABASE_GUID EFI_GUID(0xd719b2cb, 0x3d3a, 0x4596, 0xa3, 0xbc, 0xda, 0xd0, 0x0e, 0x67, 0x65, 0x6f) 663#define EFI_IMAGE_SECURITY_DATABASE_GUID EFI_GUID(0xd719b2cb, 0x3d3a, 0x4596, 0xa3, 0xbc, 0xda, 0xd0, 0x0e, 0x67, 0x65, 0x6f)
630#define EFI_SHIM_LOCK_GUID EFI_GUID(0x605dab50, 0xe046, 0x4300, 0xab, 0xb6, 0x3d, 0xd8, 0x10, 0xdd, 0x8b, 0x23) 664#define EFI_SHIM_LOCK_GUID EFI_GUID(0x605dab50, 0xe046, 0x4300, 0xab, 0xb6, 0x3d, 0xd8, 0x10, 0xdd, 0x8b, 0x23)
@@ -637,6 +671,7 @@ void efi_native_runtime_setup(void);
637#define LINUX_EFI_ARM_SCREEN_INFO_TABLE_GUID EFI_GUID(0xe03fc20a, 0x85dc, 0x406e, 0xb9, 0x0e, 0x4a, 0xb5, 0x02, 0x37, 0x1d, 0x95) 671#define LINUX_EFI_ARM_SCREEN_INFO_TABLE_GUID EFI_GUID(0xe03fc20a, 0x85dc, 0x406e, 0xb9, 0x0e, 0x4a, 0xb5, 0x02, 0x37, 0x1d, 0x95)
638#define LINUX_EFI_LOADER_ENTRY_GUID EFI_GUID(0x4a67b082, 0x0a4c, 0x41cf, 0xb6, 0xc7, 0x44, 0x0b, 0x29, 0xbb, 0x8c, 0x4f) 672#define LINUX_EFI_LOADER_ENTRY_GUID EFI_GUID(0x4a67b082, 0x0a4c, 0x41cf, 0xb6, 0xc7, 0x44, 0x0b, 0x29, 0xbb, 0x8c, 0x4f)
639#define LINUX_EFI_RANDOM_SEED_TABLE_GUID EFI_GUID(0x1ce1e5bc, 0x7ceb, 0x42f2, 0x81, 0xe5, 0x8a, 0xad, 0xf1, 0x80, 0xf5, 0x7b) 673#define LINUX_EFI_RANDOM_SEED_TABLE_GUID EFI_GUID(0x1ce1e5bc, 0x7ceb, 0x42f2, 0x81, 0xe5, 0x8a, 0xad, 0xf1, 0x80, 0xf5, 0x7b)
674#define LINUX_EFI_TPM_EVENT_LOG_GUID EFI_GUID(0xb7799cb0, 0xeca2, 0x4943, 0x96, 0x67, 0x1f, 0xae, 0x07, 0xb7, 0x47, 0xfa)
640 675
641typedef struct { 676typedef struct {
642 efi_guid_t guid; 677 efi_guid_t guid;
@@ -911,6 +946,7 @@ extern struct efi {
911 unsigned long properties_table; /* properties table */ 946 unsigned long properties_table; /* properties table */
912 unsigned long mem_attr_table; /* memory attributes table */ 947 unsigned long mem_attr_table; /* memory attributes table */
913 unsigned long rng_seed; /* UEFI firmware random seed */ 948 unsigned long rng_seed; /* UEFI firmware random seed */
949 unsigned long tpm_log; /* TPM2 Event Log table */
914 efi_get_time_t *get_time; 950 efi_get_time_t *get_time;
915 efi_set_time_t *set_time; 951 efi_set_time_t *set_time;
916 efi_get_wakeup_time_t *get_wakeup_time; 952 efi_get_wakeup_time_t *get_wakeup_time;
@@ -1536,6 +1572,8 @@ static inline void
1536efi_enable_reset_attack_mitigation(efi_system_table_t *sys_table_arg) { } 1572efi_enable_reset_attack_mitigation(efi_system_table_t *sys_table_arg) { }
1537#endif 1573#endif
1538 1574
1575void efi_retrieve_tpm2_eventlog(efi_system_table_t *sys_table);
1576
1539/* 1577/*
1540 * Arch code can implement the following three template macros, avoiding 1578 * Arch code can implement the following three template macros, avoiding
1541 * reptition for the void/non-void return cases of {__,}efi_call_virt(): 1579 * reptition for the void/non-void return cases of {__,}efi_call_virt():
@@ -1603,4 +1641,12 @@ struct linux_efi_random_seed {
1603 u8 bits[]; 1641 u8 bits[];
1604}; 1642};
1605 1643
1644struct linux_efi_tpm_eventlog {
1645 u32 size;
1646 u8 version;
1647 u8 log[];
1648};
1649
1650extern int efi_tpm_eventlog_init(void);
1651
1606#endif /* _LINUX_EFI_H */ 1652#endif /* _LINUX_EFI_H */