diff options
| author | Tom Rini <[email protected]> | 2021-09-04 15:59:00 -0400 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2021-09-04 15:59:00 -0400 |
| commit | 5e893897c675f2a4690b4decf9ee5a49ea9a2e3e (patch) | |
| tree | 6ea0abbae390e0d6619deda0e9d771ab50fee28d /include | |
| parent | ecd6e0ce5aaeeb1149b0b8ebe6bed8198d0bd2fe (diff) | |
| parent | 538c0f2d3798261161a28a05e445d0c85af56276 (diff) | |
Merge tag 'efi-2021-10-rc4' of https://source.denx.de/u-boot/custodians/u-boot-efi
Pull request for efi-2021-10-rc4
Documentation:
Remove invalid reference to configuration variable in UEFI doc
UEFI:
Parameter checks for the EFI_TCG2_PROTOCOL
Improve support of preseeding UEFI variables.
Correct the calculation of the size of loaded images.
Allow for UEFI images with zero VirtualSize
Diffstat (limited to 'include')
| -rw-r--r-- | include/efi_tcg2.h | 4 | ||||
| -rw-r--r-- | include/efi_variable.h | 6 |
2 files changed, 8 insertions, 2 deletions
diff --git a/include/efi_tcg2.h b/include/efi_tcg2.h index b6b958da514..c99384fb005 100644 --- a/include/efi_tcg2.h +++ b/include/efi_tcg2.h @@ -28,6 +28,8 @@ #define EFI_TCG2_EXTEND_ONLY 0x0000000000000001 #define PE_COFF_IMAGE 0x0000000000000010 +#define EFI_TCG2_MAX_PCR_INDEX 23 + /* Algorithm Registry */ #define EFI_TCG2_BOOT_HASH_ALG_SHA1 0x00000001 #define EFI_TCG2_BOOT_HASH_ALG_SHA256 0x00000002 @@ -127,8 +129,8 @@ struct efi_tcg2_boot_service_capability { efi_tcg_event_algorithm_bitmap active_pcr_banks; }; +/* up to and including the vendor ID (manufacturer_id) field */ #define boot_service_capability_min \ - sizeof(struct efi_tcg2_boot_service_capability) - \ offsetof(struct efi_tcg2_boot_service_capability, number_of_pcr_banks) #define TCG_EFI_SPEC_ID_EVENT_SIGNATURE_03 "Spec ID Event03" diff --git a/include/efi_variable.h b/include/efi_variable.h index 4623a641427..0440d356bc8 100644 --- a/include/efi_variable.h +++ b/include/efi_variable.h @@ -12,6 +12,7 @@ enum efi_auth_var_type { EFI_AUTH_VAR_NONE = 0, + EFI_AUTH_MODE, EFI_AUTH_VAR_PK, EFI_AUTH_VAR_KEK, EFI_AUTH_VAR_DB, @@ -161,10 +162,13 @@ efi_status_t __maybe_unused efi_var_collect(struct efi_var_file **bufp, loff_t * /** * efi_var_restore() - restore EFI variables from buffer * + * Only if @safe is set secure boot related variables will be restored. + * * @buf: buffer + * @safe: restoring from tamper-resistant storage * Return: status code */ -efi_status_t efi_var_restore(struct efi_var_file *buf); +efi_status_t efi_var_restore(struct efi_var_file *buf, bool safe); /** * efi_var_from_file() - read variables from file |
