Make tpm.c build right on 32-bit platforms.

EFI_PHYSICAL_ADDRESS is UINT64 everywhere, so you can't just copy a
32-bit pointer to it.

Signed-off-by: Peter Jones <pjones@redhat.com>
This commit is contained in:
Peter Jones 2017-08-01 17:02:29 -04:00
parent bdc5d3ec9c
commit 2d82a3899b

5
tpm.c
View File

@ -1,6 +1,7 @@
#include <efi.h>
#include <efilib.h>
#include <string.h>
#include <stdint.h>
#include "tpm.h"
@ -331,8 +332,8 @@ EFI_STATUS tpm_measure_variable(CHAR16 *VarName, EFI_GUID VendorGuid, UINTN VarS
CopyMem ((CHAR16 *)VarLog->UnicodeName + VarNameLength, VarData,
VarSize);
Status = tpm_log_event_raw((EFI_PHYSICAL_ADDRESS)VarLog, VarLogSize, 7,
(CHAR8 *)VarLog, VarLogSize,
Status = tpm_log_event_raw((EFI_PHYSICAL_ADDRESS)(intptr_t)VarLog,
VarLogSize, 7, (CHAR8 *)VarLog, VarLogSize,
EV_EFI_VARIABLE_AUTHORITY, NULL);
FreePool(VarLog);