From 163a0d7e2cbdbdf26d90ac8d30c0495b814f3245 Mon Sep 17 00:00:00 2001 From: Masahisa Kojima Date: Wed, 26 May 2021 12:09:58 +0900 Subject: efi_loader: add PE/COFF image measurement "TCG PC Client Platform Firmware Profile Specification" requires to measure every attempt to load and execute a OS Loader(a UEFI application) into PCR[4]. This commit adds the PE/COFF image measurement, extends PCR, and appends measurement into Event Log. Acked-by: Ilias Apalodimas Tested-by: Ilias Apalodimas Signed-off-by: Masahisa Kojima Replace CONFIG_HASH_CALCULATE by CONFIG_HASH Fix conversions between pointers and u64. Signed-off-by: Heinrich Schuchardt Reviewed-by: Ilias Apalodimas --- include/efi_tcg2.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'include/efi_tcg2.h') diff --git a/include/efi_tcg2.h b/include/efi_tcg2.h index 40e241ce315..bcfb98168aa 100644 --- a/include/efi_tcg2.h +++ b/include/efi_tcg2.h @@ -9,6 +9,7 @@ #if !defined _EFI_TCG2_PROTOCOL_H_ #define _EFI_TCG2_PROTOCOL_H_ +#include #include #define EFI_TCG2_PROTOCOL_GUID \ @@ -53,6 +54,14 @@ struct efi_tcg2_event { u8 event[]; } __packed; +struct uefi_image_load_event { + efi_physical_addr_t image_location_in_memory; + u64 image_length_in_memory; + u64 image_link_time_address; + u64 length_of_device_path; + struct efi_device_path device_path[]; +}; + struct efi_tcg2_boot_service_capability { u8 size; struct efi_tcg2_version structure_version; -- cgit v1.2.3