diff options
author | Jon Murphy <jpmurphy@google.com> | 2023-09-26 21:05:37 -0600 |
---|---|---|
committer | Raul Rangel <rrangel@chromium.org> | 2023-09-28 16:54:31 +0000 |
commit | 53fc667943052bd592b8406bdf4bf652c6c9cd3a (patch) | |
tree | b5729589da0f5b77fd3898a03648bef60ab5a11a /src/security/tpm/tss/tcg-1.2 | |
parent | 901f0400b701791524301ce4ab2ba5bd028e7e2b (diff) |
treewide: convert to %#x hex prints
Convert hex print values to use the %#x qualifier to print 0x{value}.
BUG=b:296439237
TEST=build and boot to Skyrim
BRANCH=None
Change-Id: I0d1ac4b920530635fb758c5165a6a99c11b414c8
Signed-off-by: Jon Murphy <jpmurphy@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78183
Reviewed-by: Raul Rangel <rrangel@chromium.org>
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/security/tpm/tss/tcg-1.2')
-rw-r--r-- | src/security/tpm/tss/tcg-1.2/tss.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/security/tpm/tss/tcg-1.2/tss.c b/src/security/tpm/tss/tcg-1.2/tss.c index b6527a6482..076b8a7562 100644 --- a/src/security/tpm/tss/tcg-1.2/tss.c +++ b/src/security/tpm/tss/tcg-1.2/tss.c @@ -82,7 +82,7 @@ static uint32_t tlcl_send_receive_no_retry(const uint8_t *request, response, &response_length); if (rc != 0) { /* Communication with TPM failed, so response is garbage */ - VBDEBUG("TPM: command 0x%x send/receive failed: 0x%x\n", + VBDEBUG("TPM: command %#x send/receive failed: %#x\n", tpm_command_code(request), rc); return rc; } @@ -93,7 +93,7 @@ static uint32_t tlcl_send_receive_no_retry(const uint8_t *request, * (and possibly expected length from the response header). See * crosbug.com/17017 */ - VBDEBUG("TPM: command 0x%x returned 0x%x\n", + VBDEBUG("TPM: command %#x returned %#x\n", tpm_command_code(request), rc); return rc; @@ -193,7 +193,7 @@ uint32_t tlcl_continue_self_test(void) uint32_t tlcl_define_space(uint32_t index, uint32_t perm, uint32_t size) { struct s_tpm_nv_definespace_cmd cmd; - VBDEBUG("TPM: TlclDefineSpace(0x%x, 0x%x, %d)\n", index, perm, size); + VBDEBUG("TPM: TlclDefineSpace(%#x, %#x, %d)\n", index, perm, size); memcpy(&cmd, &tpm_nv_definespace_cmd, sizeof(cmd)); to_tpm_uint32(cmd.buffer + tpm_nv_definespace_cmd.index, index); to_tpm_uint32(cmd.buffer + tpm_nv_definespace_cmd.perm, perm); @@ -208,7 +208,7 @@ uint32_t tlcl_write(uint32_t index, const void *data, uint32_t length) const int total_length = kTpmRequestHeaderLength + kWriteInfoLength + length; - VBDEBUG("TPM: %s(0x%x, %d)\n", __func__, index, length); + VBDEBUG("TPM: %s(%#x, %d)\n", __func__, index, length); memcpy(&cmd, &tpm_nv_write_cmd, sizeof(cmd)); assert(total_length <= TPM_LARGE_ENOUGH_COMMAND_SIZE); set_tpm_command_size(cmd.buffer, total_length); @@ -228,7 +228,7 @@ uint32_t tlcl_read(uint32_t index, void *data, uint32_t length) uint32_t result_length; uint32_t rc; - VBDEBUG("TPM: %s(0x%x, %d)\n", __func__, index, length); + VBDEBUG("TPM: %s(%#x, %d)\n", __func__, index, length); memcpy(&cmd, &tpm_nv_read_cmd, sizeof(cmd)); to_tpm_uint32(cmd.buffer + tpm_nv_read_cmd.index, index); to_tpm_uint32(cmd.buffer + tpm_nv_read_cmd.length, length); |