diff options
-rw-r--r-- | firmware/include/tpm2_tss_constants.h | 2 | ||||
-rw-r--r-- | firmware/lib/tpm2_lite/marshaling.c | 3 |
2 files changed, 2 insertions, 3 deletions
diff --git a/firmware/include/tpm2_tss_constants.h b/firmware/include/tpm2_tss_constants.h index 498cc954..92b53a0e 100644 --- a/firmware/include/tpm2_tss_constants.h +++ b/firmware/include/tpm2_tss_constants.h @@ -196,7 +196,7 @@ struct tpm2_shutdown_cmd { struct tpm_header { uint16_t tpm_tag; uint32_t tpm_size; - TPM_CC tpm_code; + uint32_t tpm_code; } __attribute__((packed)); struct nv_read_response { diff --git a/firmware/lib/tpm2_lite/marshaling.c b/firmware/lib/tpm2_lite/marshaling.c index b5d45bfc..ab374951 100644 --- a/firmware/lib/tpm2_lite/marshaling.c +++ b/firmware/lib/tpm2_lite/marshaling.c @@ -322,7 +322,6 @@ static void marshal_u32(void **buffer, uint32_t value, int *buffer_space) *buffer_space -= sizeof(value); } -#define unmarshal_TPM_CC(a, b) unmarshal_u32(a, b) #define marshal_TPM_HANDLE(a, b, c) marshal_u32(a, b, c) #define marshal_TPM_SU(a, b, c) marshal_u16(a, b, c) #define marshal_ALG_ID(a, b, c) marshal_u16(a, b, c) @@ -727,7 +726,7 @@ int tpm_unmarshal_response(TPM_CC command, response->hdr.tpm_tag = unmarshal_u16(&response_body, &cr_size); response->hdr.tpm_size = unmarshal_u32(&response_body, &cr_size); - response->hdr.tpm_code = unmarshal_TPM_CC(&response_body, &cr_size); + response->hdr.tpm_code = unmarshal_u32(&response_body, &cr_size); if (!cr_size) { if (response->hdr.tpm_size != sizeof(response->hdr)) |