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>
This commit is contained in:
Jon Murphy 2023-09-26 21:05:37 -06:00 committed by Raul Rangel
parent 901f0400b7
commit 53fc667943
21 changed files with 63 additions and 63 deletions

View File

@ -460,7 +460,7 @@ int tpm_vendor_init(struct tpm_chip *chip, unsigned int bus, uint32_t dev_addr)
if (claim_locality())
return -1;
printk(BIOS_DEBUG, "cr50 TPM 2.0 (i2c %u:0x%02x id 0x%x)\n",
printk(BIOS_DEBUG, "cr50 TPM 2.0 (i2c %u:0x%02x id %#x)\n",
bus, dev_addr, did_vid >> 16);
if (tpm_first_access_this_boot()) {

View File

@ -62,7 +62,7 @@ static ssize_t tpm_transmit(const uint8_t *sbuf, size_t sbufsiz, void *rbuf,
return -1;
}
if (count > sbufsiz) {
printk(BIOS_DEBUG, "%s: invalid count value %x %zx\n", __func__,
printk(BIOS_DEBUG, "%s: invalid count value %#x %zx\n", __func__,
count, sbufsiz);
return -1;
}

View File

@ -534,7 +534,7 @@ int tpm_vendor_init(struct tpm_chip *chip, unsigned int bus, uint32_t dev_addr)
goto out_err;
}
printk(BIOS_DEBUG, "I2C TPM %u:%02x (chip type %s device-id 0x%X)\n",
printk(BIOS_DEBUG, "I2C TPM %u:%02x (chip type %s device-id %#X)\n",
tpm_dev.bus, tpm_dev.addr,
chip_name[tpm_dev.chip_type], vendor >> 16);

View File

@ -35,9 +35,9 @@
printk(BIOS_DEBUG, fmt, ##args); \
}
#define TPM_DEBUG_IO_READ(reg_, val_) \
TPM_DEBUG("Read reg 0x%x returns 0x%x\n", (reg_), (val_))
TPM_DEBUG("Read reg %#x returns %#x\n", (reg_), (val_))
#define TPM_DEBUG_IO_WRITE(reg_, val_) \
TPM_DEBUG("Write reg 0x%x with 0x%x\n", (reg_), (val_))
TPM_DEBUG("Write reg %#x with %#x\n", (reg_), (val_))
#define printf(x...) printk(BIOS_ERR, x)
/* coreboot wrapper for TPM driver (end) */
@ -499,7 +499,7 @@ static u32 tis_senddata(const u8 *const data, u32 len)
* command.
*/
if (tis_wait_valid(locality) || tis_expect_data(locality)) {
printf("%s:%d unexpected TPM status 0x%x\n",
printf("%s:%d unexpected TPM status %#x\n",
__FILE__, __LINE__, tpm_read_status(locality));
return TPM_DRIVER_ERR;
}
@ -596,7 +596,7 @@ static u32 tis_readresponse(u8 *buffer, size_t *len)
/* * Make sure we indeed read all there was. */
if (tis_has_valid_data(locality)) {
printf("%s:%d wrong receive status: %x %u bytes left\n",
printf("%s:%d wrong receive status: %#x %u bytes left\n",
__FILE__, __LINE__, tpm_read_status(locality),
tpm_read_burst_count(locality));
return TPM_DRIVER_ERR;

View File

@ -509,7 +509,7 @@ static enum cb_err wait_for_status(uint32_t status_mask, uint32_t status_expecte
do {
udelay(1000);
if (stopwatch_expired(&sw)) {
printk(BIOS_ERR, "failed to get expected status %x\n",
printk(BIOS_ERR, "failed to get expected status %#x\n",
status_expected);
return CB_ERR;
}

View File

@ -88,7 +88,7 @@ int mb_crtm(void)
tcgEventHdr.eventSize, &tcgEventHdr,
(uint8_t *)crtm_version);
if (rc) {
printk(BIOS_DEBUG, "Measure CRTM Version returned 0x%x\n", rc);
printk(BIOS_DEBUG, "Measure CRTM Version returned %#x\n", rc);
}
return rc;

View File

@ -38,7 +38,7 @@ void mainboard_update_soc_chip_config(struct soc_intel_alderlake_config *config)
rc = tlcl_lib_init();
if (rc != VB2_SUCCESS) {
printk(BIOS_ERR, "tlcl_lib_init() failed: 0x%x\n", rc);
printk(BIOS_ERR, "tlcl_lib_init() failed: %#x\n", rc);
return;
}

View File

@ -18,7 +18,7 @@ static void mainboard_update_soc_chip_config(void)
rc = tlcl_lib_init();
if (rc != VB2_SUCCESS) {
printk(BIOS_ERR, "tlcl_lib_init() failed: 0x%x\n", rc);
printk(BIOS_ERR, "tlcl_lib_init() failed: %#x\n", rc);
return;
}

View File

@ -95,7 +95,7 @@ void mainboard_update_soc_chip_config(struct soc_intel_tigerlake_config *cfg)
rc = tlcl_lib_init();
if (rc != VB2_SUCCESS) {
printk(BIOS_ERR, "tlcl_lib_init() failed: 0x%x\n", rc);
printk(BIOS_ERR, "tlcl_lib_init() failed: %#x\n", rc);
return;
}

View File

@ -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);

View File

@ -60,7 +60,7 @@ static uint32_t tlcl_send_startup(TPM_SU type)
return TPM_IOERROR;
}
printk(BIOS_INFO, "%s: Startup return code is %x\n",
printk(BIOS_INFO, "%s: Startup return code is %#x\n",
__func__, response->hdr.tpm_code);
switch (response->hdr.tpm_code) {
@ -94,7 +94,7 @@ static uint32_t tlcl_send_shutdown(TPM_SU type)
return TPM_IOERROR;
}
printk(BIOS_INFO, "%s: Shutdown return code is %x\n",
printk(BIOS_INFO, "%s: Shutdown return code is %#x\n",
__func__, response->hdr.tpm_code);
if (response->hdr.tpm_code == TPM2_RC_SUCCESS)
@ -155,7 +155,7 @@ uint32_t tlcl_extend(int pcr_num, const uint8_t *digest_data,
response = tpm_process_command(TPM2_PCR_Extend, &pcr_ext_cmd);
printk(BIOS_INFO, "%s: response is %x\n",
printk(BIOS_INFO, "%s: response is %#x\n",
__func__, response ? response->hdr.tpm_code : -1);
if (!response || response->hdr.tpm_code)
return TPM_IOERROR;
@ -175,7 +175,7 @@ uint32_t tlcl_force_clear(void)
struct tpm2_response *response;
response = tpm_process_command(TPM2_Clear, NULL);
printk(BIOS_INFO, "%s: response is %x\n",
printk(BIOS_INFO, "%s: response is %#x\n",
__func__, response ? response->hdr.tpm_code : -1);
if (!response || response->hdr.tpm_code)
@ -192,7 +192,7 @@ uint32_t tlcl_clear_control(bool disable)
};
response = tpm_process_command(TPM2_ClearControl, &cc);
printk(BIOS_INFO, "%s: response is %x\n",
printk(BIOS_INFO, "%s: response is %#x\n",
__func__, response ? response->hdr.tpm_code : -1);
if (!response || response->hdr.tpm_code)
@ -246,7 +246,7 @@ uint32_t tlcl_read(uint32_t index, void *data, uint32_t length)
if (!response)
return TPM_CB_READ_FAILURE;
printk(BIOS_INFO, "%s:%d index %#x return code %x\n",
printk(BIOS_INFO, "%s:%d index %#x return code %#x\n",
__FILE__, __LINE__, index, response->hdr.tpm_code);
switch (response->hdr.tpm_code) {
case 0:
@ -287,7 +287,7 @@ uint32_t tlcl_self_test_full(void)
st.yes_no = 1;
response = tpm_process_command(TPM2_SelfTest, &st);
printk(BIOS_INFO, "%s: response is %x\n",
printk(BIOS_INFO, "%s: response is %#x\n",
__func__, response ? response->hdr.tpm_code : -1);
return TPM_SUCCESS;
}
@ -302,7 +302,7 @@ uint32_t tlcl_lock_nv_write(uint32_t index)
response = tpm_process_command(TPM2_NV_WriteLock, &nv_wl);
printk(BIOS_INFO, "%s: response is %x\n",
printk(BIOS_INFO, "%s: response is %#x\n",
__func__, response ? response->hdr.tpm_code : -1);
if (!response || response->hdr.tpm_code)
@ -329,7 +329,7 @@ uint32_t tlcl_write(uint32_t index, const void *data, uint32_t length)
response = tpm_process_command(TPM2_NV_Write, &nv_writec);
printk(BIOS_INFO, "%s: response is %x\n",
printk(BIOS_INFO, "%s: response is %#x\n",
__func__, response ? response->hdr.tpm_code : -1);
/* Need to map tpm error codes into internal values. */
@ -352,7 +352,7 @@ uint32_t tlcl_set_bits(uint32_t index, uint64_t bits)
response = tpm_process_command(TPM2_NV_SetBits, &nvsb_cmd);
printk(BIOS_INFO, "%s: response is %x\n",
printk(BIOS_INFO, "%s: response is %#x\n",
__func__, response ? response->hdr.tpm_code : -1);
/* Need to map tpm error codes into internal values. */
@ -388,7 +388,7 @@ uint32_t tlcl_define_space(uint32_t space_index, size_t space_size,
}
response = tpm_process_command(TPM2_NV_DefineSpace, &nvds_cmd);
printk(BIOS_INFO, "%s: response is %x\n", __func__,
printk(BIOS_INFO, "%s: response is %#x\n", __func__,
response ? response->hdr.tpm_code : -1);
if (!response)

View File

@ -20,7 +20,7 @@ uint32_t tlcl_cr50_enable_nvcommits(void)
if (!response || (response && response->hdr.tpm_code)) {
if (response)
printk(BIOS_INFO, "%s: failed %x\n", __func__,
printk(BIOS_INFO, "%s: failed %#x\n", __func__,
response->hdr.tpm_code);
else
printk(BIOS_INFO, "%s: failed\n", __func__);

View File

@ -41,7 +41,7 @@ void mrc_cache_update_hash(uint32_t index, const uint8_t *data, size_t size)
return;
}
printk(BIOS_INFO, "MRC: TPM MRC hash idx 0x%x updated successfully.\n", index);
printk(BIOS_INFO, "MRC: TPM MRC hash idx %#x updated successfully.\n", index);
}
int mrc_cache_verify_hash(uint32_t index, const uint8_t *data, size_t size)
@ -67,7 +67,7 @@ int mrc_cache_verify_hash(uint32_t index, const uint8_t *data, size_t size)
return 0;
}
printk(BIOS_INFO, "MRC: Hash idx 0x%x comparison successful.\n", index);
printk(BIOS_INFO, "MRC: Hash idx %#x comparison successful.\n", index);
return 1;
}

View File

@ -436,8 +436,8 @@ uint32_t antirollback_lock_space_firmware(void)
uint32_t antirollback_read_space_mrc_hash(uint32_t index, uint8_t *data, uint32_t size)
{
if (size != HASH_NV_SIZE) {
VBDEBUG("TPM: Incorrect buffer size for hash idx 0x%x. "
"(Expected=0x%x Actual=0x%x).\n", index, HASH_NV_SIZE,
VBDEBUG("TPM: Incorrect buffer size for hash idx %#x. "
"(Expected=%#x Actual=%#x).\n", index, HASH_NV_SIZE,
size);
return TPM_CB_READ_FAILURE;
}
@ -450,8 +450,8 @@ uint32_t antirollback_write_space_mrc_hash(uint32_t index, const uint8_t *data,
uint32_t rc;
if (size != HASH_NV_SIZE) {
VBDEBUG("TPM: Incorrect buffer size for hash idx 0x%x. "
"(Expected=0x%x Actual=0x%x).\n", index, HASH_NV_SIZE,
VBDEBUG("TPM: Incorrect buffer size for hash idx %#x. "
"(Expected=%#x Actual=%#x).\n", index, HASH_NV_SIZE,
size);
return TPM_CB_WRITE_FAILURE;
}
@ -486,8 +486,8 @@ static uint32_t read_space_vbios_hash(uint8_t *data)
uint32_t antirollback_read_space_vbios_hash(uint8_t *data, uint32_t size)
{
if (size != HASH_NV_SIZE) {
VBDEBUG("TPM: Incorrect buffer size for hash idx 0x%x. "
"(Expected=0x%x Actual=0x%x).\n", VBIOS_CACHE_NV_INDEX, HASH_NV_SIZE,
VBDEBUG("TPM: Incorrect buffer size for hash idx %#x. "
"(Expected=%#x Actual=%#x).\n", VBIOS_CACHE_NV_INDEX, HASH_NV_SIZE,
size);
return TPM_CB_READ_FAILURE;
}
@ -500,8 +500,8 @@ uint32_t antirollback_write_space_vbios_hash(const uint8_t *data, uint32_t size)
uint32_t rc;
if (size != HASH_NV_SIZE) {
VBDEBUG("TPM: Incorrect buffer size for hash idx 0x%x. "
"(Expected=0x%x Actual=0x%x).\n", VBIOS_CACHE_NV_INDEX, HASH_NV_SIZE,
VBDEBUG("TPM: Incorrect buffer size for hash idx %#x. "
"(Expected=%#x Actual=%#x).\n", VBIOS_CACHE_NV_INDEX, HASH_NV_SIZE,
size);
return TPM_CB_WRITE_FAILURE;
}

View File

@ -41,7 +41,7 @@ void vbios_cache_update_hash(const uint8_t *data, size_t size)
return;
}
printk(BIOS_INFO, "VBIOS_CACHE: TPM NV idx 0x%x updated successfully.\n",
printk(BIOS_INFO, "VBIOS_CACHE: TPM NV idx %#x updated successfully.\n",
VBIOS_CACHE_NV_INDEX);
}
@ -68,7 +68,7 @@ enum cb_err vbios_cache_verify_hash(const uint8_t *data, size_t size)
return CB_ERR;
}
printk(BIOS_INFO, "VBIOS_CACHE: Hash idx 0x%x comparison successful.\n",
printk(BIOS_INFO, "VBIOS_CACHE: Hash idx %#x comparison successful.\n",
VBIOS_CACHE_NV_INDEX);
return CB_SUCCESS;

View File

@ -318,7 +318,7 @@ void verstage_main(void)
* For any other error code, save context if needed and reboot.
*/
if (rv == VB2_ERROR_API_PHASE1_RECOVERY) {
printk(BIOS_INFO, "Recovery requested (%x)\n", rv);
printk(BIOS_INFO, "Recovery requested (%#x)\n", rv);
vboot_save_data(ctx);
extend_pcrs(ctx); /* ignore failures */
goto verstage_main_exit;
@ -376,7 +376,7 @@ void verstage_main(void)
timestamp_add_now(TS_TPMLOCK_START);
rv = antirollback_lock_space_firmware();
if (rv) {
printk(BIOS_INFO, "Failed to lock TPM (%x)\n", rv);
printk(BIOS_INFO, "Failed to lock TPM (%#x)\n", rv);
vboot_fail_and_reboot(ctx, VB2_RECOVERY_RO_TPM_L_ERROR, 0);
}
timestamp_add_now(TS_TPMLOCK_END);
@ -385,7 +385,7 @@ void verstage_main(void)
if (CONFIG(VBOOT_HAS_REC_HASH_SPACE)) {
rv = antirollback_lock_space_mrc_hash(MRC_REC_HASH_NV_INDEX);
if (rv) {
printk(BIOS_INFO, "Failed to lock rec hash space(%x)\n", rv);
printk(BIOS_INFO, "Failed to lock rec hash space(%#x)\n", rv);
vboot_fail_and_reboot(ctx, VB2_RECOVERY_RO_TPM_REC_HASH_L_ERROR, rv);
}
}

View File

@ -47,7 +47,7 @@ EFI_TCG2_EVENT_ALGORITHM_BITMAP tpm2_get_active_pcrs(void)
case TPM_ALG_SM3_256:
default:
printk(BIOS_DEBUG, "%s: unsupported algorithm "
"reported - 0x%x\n", __func__,
"reported - %#x\n", __func__,
Pcrs.pcrSelections[index].hash);
break;
}
@ -88,7 +88,7 @@ int tpm2_get_capability_pcrs(TPML_PCR_SELECTION *Pcrs)
for (index = 0; index < Pcrs->count; index++) {
Pcrs->pcrSelections[index].hash =
swab16(TpmCap.data.assignedPCR.pcrSelections[index].hash);
printk(BIOS_DEBUG, "Pcrs->pcrSelections[%d].hash = 0x%x\n", index,
printk(BIOS_DEBUG, "Pcrs->pcrSelections[%d].hash = %#x\n", index,
Pcrs->pcrSelections[index].hash);
Pcrs->pcrSelections[index].sizeofSelect =
TpmCap.data.assignedPCR.pcrSelections[index].sizeofSelect;
@ -166,7 +166,7 @@ void invalidate_pcrs(void)
(uint8_t *)"Invalidate PCR");
if (rc != TPM_SUCCESS)
printk(BIOS_DEBUG, "%s: invalidating pcr %d returned"
" 0x%x\n", __func__, pcr, rc);
" %#x\n", __func__, pcr, rc);
}
}
@ -291,7 +291,7 @@ __weak int mb_entry(int wake_from_s3)
}
if (rc)
printk(BIOS_ERR, "%s: StartUp failed 0x%x!\n", __func__, rc);
printk(BIOS_ERR, "%s: StartUp failed %#x!\n", __func__, rc);
return rc;
}
@ -327,12 +327,12 @@ __weak int mb_measure(int wake_from_s3)
printk(BIOS_DEBUG, "%s: Measuring, successful!\n", __func__);
} else {
invalidate_pcrs();
printk(BIOS_ERR, "%s: Measuring returned 0x%x unsuccessful! PCRs invalidated.\n",
printk(BIOS_ERR, "%s: Measuring returned %#x unsuccessful! PCRs invalidated.\n",
__func__, rc);
}
} else {
invalidate_pcrs();
printk(BIOS_ERR, "%s: StartUp returned 0x%x, unsuccessful! PCRs invalidated.\n", __func__,
printk(BIOS_ERR, "%s: StartUp returned %#x, unsuccessful! PCRs invalidated.\n", __func__,
rc);
}
return rc;
@ -433,13 +433,13 @@ __weak int mb_crtm(void)
rc = mboot_hash_extend_log(0, (uint8_t *)crtm_version, tcgEventHdr.eventSize,
&tcgEventHdr, (uint8_t *)crtm_version);
if (rc) {
printk(BIOS_DEBUG, "Measure CRTM Version returned 0x%x\n", rc);
printk(BIOS_DEBUG, "Measure CRTM Version returned %#x\n", rc);
return rc;
}
rc = get_intel_me_hash(hash);
if (rc) {
printk(BIOS_DEBUG, "get_intel_me_hash returned 0x%x\n", rc);
printk(BIOS_DEBUG, "get_intel_me_hash returned %#x\n", rc);
rc = TPM_IOERROR;
return rc;
}
@ -456,7 +456,7 @@ __weak int mb_crtm(void)
rc = mboot_hash_extend_log(MBOOT_HASH_PROVIDED, hash, sizeof(hash), &tcgEventHdr,
msgPtr);
if (rc)
printk(BIOS_DEBUG, "Add ME hash returned 0x%x\n", rc);
printk(BIOS_DEBUG, "Add ME hash returned %#x\n", rc);
return rc;
}

View File

@ -256,7 +256,7 @@ void process_verify_list(const verify_item_t list[])
list[i].hash_index, list[i].pcr);
break;
default:
printk(BIOS_EMERG, "INVALID TYPE IN VERIFY LIST 0x%x\n", list[i].type);
printk(BIOS_EMERG, "INVALID TYPE IN VERIFY LIST %#x\n", list[i].type);
die("HASH verification failed!\n");
}
i++;
@ -289,7 +289,7 @@ void verified_boot_early_check(void)
printk(BIOS_SPEW, "%s: processing early items\n", __func__);
if (CONFIG(VENDORCODE_ELTAN_MBOOT)) {
printk(BIOS_DEBUG, "mb_measure returned 0x%x\n",
printk(BIOS_DEBUG, "mb_measure returned %#x\n",
mb_measure(platform_is_resuming()));
}
@ -338,7 +338,7 @@ static int process_oprom_list(const verify_item_t list[],
}
break;
default:
printk(BIOS_EMERG, "%s: INVALID TYPE IN OPTION ROM LIST 0x%x\n",
printk(BIOS_EMERG, "%s: INVALID TYPE IN OPTION ROM LIST %#x\n",
__func__, list[i].type);
die("HASH verification failed!\n");
}

View File

@ -45,7 +45,7 @@ static int cr50_is_reset_needed(void)
return 1;
} else if (rc != TPM_SUCCESS) {
/* TPM command failed, continue booting. */
printk(BIOS_ERR, "Attempt to get CR50 TPM mode failed: %x\n", rc);
printk(BIOS_ERR, "Attempt to get CR50 TPM mode failed: %#x\n", rc);
return 0;
}
@ -85,7 +85,7 @@ static void enable_update(void *unused)
rc = tlcl_lib_init();
if (rc != VB2_SUCCESS) {
printk(BIOS_ERR, "tlcl_lib_init() failed for CR50 update: %x\n",
printk(BIOS_ERR, "tlcl_lib_init() failed for CR50 update: %#x\n",
rc);
return;
}
@ -97,7 +97,7 @@ static void enable_update(void *unused)
&num_restored_headers);
if (rc != TPM_SUCCESS) {
printk(BIOS_ERR, "Attempt to enable CR50 update failed: %x\n",
printk(BIOS_ERR, "Attempt to enable CR50 update failed: %#x\n",
rc);
return;
}
@ -150,7 +150,7 @@ static void enable_update(void *unused)
* booting but the current boot will likely end up at
* the recovery screen.
*/
printk(BIOS_ERR, "Attempt to reset CR50 failed: %x\n",
printk(BIOS_ERR, "Attempt to reset CR50 failed: %#x\n",
rc);
return;
}

View File

@ -23,7 +23,7 @@ void cse_board_reset(void)
/* Initialize TPM and get the cr50 firmware version. */
rc = tlcl_lib_init();
if (rc != VB2_SUCCESS) {
printk(BIOS_ERR, "tlcl_lib_init() failed: 0x%x\n", rc);
printk(BIOS_ERR, "tlcl_lib_init() failed: %#x\n", rc);
return;
}

View File

@ -18,13 +18,13 @@ static void disable_platform_hierarchy(void *unused)
rc = tlcl_lib_init();
if (rc != VB2_SUCCESS) {
printk(BIOS_ERR, "tlcl_lib_init() failed: %x\n", rc);
printk(BIOS_ERR, "tlcl_lib_init() failed: %#x\n", rc);
return;
}
rc = tlcl_disable_platform_hierarchy();
if (rc != TPM_SUCCESS)
printk(BIOS_ERR, "Platform hierarchy disablement failed: %x\n",
printk(BIOS_ERR, "Platform hierarchy disablement failed: %#x\n",
rc);
}