diff options
| author | Masahisa Kojima <[email protected]> | 2021-05-26 12:09:58 +0900 |
|---|---|---|
| committer | Heinrich Schuchardt <[email protected]> | 2021-05-28 16:17:01 +0200 |
| commit | 163a0d7e2cbdbdf26d90ac8d30c0495b814f3245 (patch) | |
| tree | e7ea6a6d79f9e4769f7fcb0c0c909992954a2423 /include/efi_loader.h | |
| parent | 464010b0be09505aaf50ec208f996a6cf478a2dc (diff) | |
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 <[email protected]>
Tested-by: Ilias Apalodimas <[email protected]>
Signed-off-by: Masahisa Kojima <[email protected]>
Replace CONFIG_HASH_CALCULATE by CONFIG_HASH
Fix conversions between pointers and u64.
Signed-off-by: Heinrich Schuchardt <[email protected]>
Reviewed-by: Ilias Apalodimas <[email protected]>
Diffstat (limited to 'include/efi_loader.h')
| -rw-r--r-- | include/efi_loader.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/efi_loader.h b/include/efi_loader.h index 522696d6351..0a9c82a257e 100644 --- a/include/efi_loader.h +++ b/include/efi_loader.h @@ -426,6 +426,10 @@ efi_status_t efi_disk_register(void); efi_status_t efi_rng_register(void); /* Called by efi_init_obj_list() to install EFI_TCG2_PROTOCOL */ efi_status_t efi_tcg2_register(void); +/* measure the pe-coff image, extend PCR and add Event Log */ +efi_status_t tcg2_measure_pe_image(void *efi, u64 efi_size, + struct efi_loaded_image_obj *handle, + struct efi_loaded_image *loaded_image_info); /* Create handles and protocols for the partitions of a block device */ int efi_disk_create_partitions(efi_handle_t parent, struct blk_desc *desc, const char *if_typename, int diskid, @@ -886,6 +890,8 @@ bool efi_secure_boot_enabled(void); bool efi_capsule_auth_enabled(void); +void *efi_prepare_aligned_image(void *efi, u64 *efi_size); + bool efi_image_parse(void *efi, size_t len, struct efi_image_regions **regp, WIN_CERTIFICATE **auth, size_t *auth_len); |
