diff options
Diffstat (limited to 'firmware/lib/tpm2_lite/tlcl.c')
-rw-r--r-- | firmware/lib/tpm2_lite/tlcl.c | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/firmware/lib/tpm2_lite/tlcl.c b/firmware/lib/tpm2_lite/tlcl.c index bb726f10..7a9f68e0 100644 --- a/firmware/lib/tpm2_lite/tlcl.c +++ b/firmware/lib/tpm2_lite/tlcl.c @@ -7,6 +7,9 @@ * in the firmware */ +#include "2sysincludes.h" +#include "2common.h" + #include "rollback_index.h" #include "tpm2_marshaling.h" #include "utility.h" @@ -23,22 +26,21 @@ static struct tpm2_response *tpm_process_command(TPM_CC command, out_size = tpm_marshal_command(command, command_body, cr_buffer, sizeof(cr_buffer)); if (out_size < 0) { - VBDEBUG(("command %#x, cr size %d\n", - command, out_size)); + VB2_DEBUG("command %#x, cr size %d\n", command, out_size); return NULL; } in_size = sizeof(cr_buffer); if (VbExTpmSendReceive(cr_buffer, out_size, cr_buffer, &in_size) != TPM_SUCCESS) { - VBDEBUG(("tpm transaction failed for %#x\n", command)); + VB2_DEBUG("tpm transaction failed for %#x\n", command); return NULL; } response = tpm_unmarshal_response(command, cr_buffer, in_size); - VBDEBUG(("%s: command %#x, return code %#x\n", __func__, command, - response ? response->hdr.tpm_code : -1)); + VB2_DEBUG("%s: command %#x, return code %#x\n", __func__, command, + response ? response->hdr.tpm_code : -1); return response; } @@ -208,13 +210,13 @@ uint32_t TlclForceClear(void) uint32_t TlclSetDeactivated(uint8_t flag) { - VBDEBUG(("%s called, NOT YET IMPLEMENTED\n", __func__)); + VB2_DEBUG("%s called, NOT YET IMPLEMENTED\n", __func__); return TPM_SUCCESS; } uint32_t TlclSetEnable(void) { - VBDEBUG(("%s called, NOT YET IMPLEMENTED\n", __func__)); + VB2_DEBUG("%s called, NOT YET IMPLEMENTED\n", __func__); return TPM_SUCCESS; } @@ -234,13 +236,13 @@ uint32_t TlclGetFlags(uint8_t* disable, int TlclIsOwned(void) { - VBDEBUG(("%s called, NOT YET IMPLEMENTED\n", __func__)); + VB2_DEBUG("%s called, NOT YET IMPLEMENTED\n", __func__); return 0; } uint32_t TlclExtend(int pcr_num, const uint8_t *in_digest, uint8_t *out_digest) { - VBDEBUG(("%s called, NOT YET IMPLEMENTED\n", __func__)); + VB2_DEBUG("%s called, NOT YET IMPLEMENTED\n", __func__); return TPM_SUCCESS; } @@ -474,7 +476,7 @@ uint32_t TlclWrite(uint32_t index, const void *data, uint32_t length) uint32_t TlclPCRRead(uint32_t index, void *data, uint32_t length) { - VBDEBUG(("%s called, NOT YET IMPLEMENTED\n", __func__)); + VB2_DEBUG("%s called, NOT YET IMPLEMENTED\n", __func__); return TPM_SUCCESS; } @@ -517,6 +519,6 @@ uint32_t TlclReadLock(uint32_t index) uint32_t TlclGetRandom(uint8_t *data, uint32_t length, uint32_t *size) { *size = 0; - VBDEBUG(("%s called, NOT YET IMPLEMENTED\n", __func__)); + VB2_DEBUG("%s called, NOT YET IMPLEMENTED\n", __func__); return TPM_E_IOERROR; } |