summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLans Zhang <jia.zhang@windriver.com>2016-11-16 15:28:08 +0800
committerPeter Jones <pjones@redhat.com>2016-11-30 12:56:55 -0500
commit7bfcd70801fa86e4b7f96c7e8e5b37e0059b22f6 (patch)
treec02073b93084495ca5eb2a516f58a2c429775e68
parent1ee26db0db18c60c5a4ac15bca4681c68485b7eb (diff)
downloadefi-boot-shim-7bfcd70801fa86e4b7f96c7e8e5b37e0059b22f6.tar.gz
efi-boot-shim-7bfcd70801fa86e4b7f96c7e8e5b37e0059b22f6.zip
shim/tpm: fix trigger failure caused by NULL arguments
Certain AMI BIOS (Intel NUC5i3MYBE BIOS version 0037) may make the strict check on the last 3 arguments passed to get_event_log() and don't expect NULL pointers are passed. In order to work around this failure (EFI_INVALID_PARAMETER), pass them even though we really don't use it. Signed-off-by: Lans Zhang <jia.zhang@windriver.com>
-rw-r--r--tpm.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/tpm.c b/tpm.c
index 9b5a8991..4395821d 100644
--- a/tpm.c
+++ b/tpm.c
@@ -71,9 +71,13 @@ static BOOLEAN tpm2_present(efi_tpm2_protocol_t *tpm)
*/
static EFI_STATUS trigger_tcg2_final_events_table(efi_tpm2_protocol_t *tpm2)
{
+ EFI_PHYSICAL_ADDRESS start;
+ EFI_PHYSICAL_ADDRESS end;
+ BOOLEAN truncated;
+
return uefi_call_wrapper(tpm2->get_event_log, 5, tpm2,
- EFI_TCG2_EVENT_LOG_FORMAT_TCG_2, NULL,
- NULL, NULL);
+ EFI_TCG2_EVENT_LOG_FORMAT_TCG_2, &start,
+ &end, &truncated);
}
EFI_STATUS tpm_log_event(EFI_PHYSICAL_ADDRESS buf, UINTN size, UINT8 pcr,