summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/drivers/i2c/tpm/cr50.c2
-rw-r--r--src/drivers/i2c/tpm/tis.c2
-rw-r--r--src/drivers/i2c/tpm/tpm.c2
-rw-r--r--src/drivers/pc80/tpm/tis.c8
-rw-r--r--src/drivers/spi/tpm/tpm.c2
-rw-r--r--src/mainboard/facebook/fbg1701/romstage.c2
-rw-r--r--src/mainboard/google/brya/mainboard.c2
-rw-r--r--src/mainboard/google/dedede/mainboard.c2
-rw-r--r--src/mainboard/google/volteer/mainboard.c2
-rw-r--r--src/security/tpm/tss/tcg-1.2/tss.c10
-rw-r--r--src/security/tpm/tss/tcg-2.0/tss.c22
-rw-r--r--src/security/tpm/tss/vendor/cr50/cr50.c2
-rw-r--r--src/security/vboot/mrc_cache_hash_tpm.c4
-rw-r--r--src/security/vboot/secdata_tpm.c16
-rw-r--r--src/security/vboot/vbios_cache_hash_tpm.c4
-rw-r--r--src/security/vboot/vboot_logic.c6
-rw-r--r--src/vendorcode/eltan/security/mboot/mboot.c18
-rw-r--r--src/vendorcode/eltan/security/verified_boot/vboot_check.c6
-rw-r--r--src/vendorcode/google/chromeos/cr50_enable_update.c8
-rw-r--r--src/vendorcode/google/chromeos/cse_board_reset.c2
-rw-r--r--src/vendorcode/google/chromeos/tpm2.c4
21 files changed, 63 insertions, 63 deletions
diff --git a/src/drivers/i2c/tpm/cr50.c b/src/drivers/i2c/tpm/cr50.c
index 75b235e179..929628407d 100644
--- a/src/drivers/i2c/tpm/cr50.c
+++ b/src/drivers/i2c/tpm/cr50.c
@@ -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()) {
diff --git a/src/drivers/i2c/tpm/tis.c b/src/drivers/i2c/tpm/tis.c
index e9bf2cf706..25b7f40801 100644
--- a/src/drivers/i2c/tpm/tis.c
+++ b/src/drivers/i2c/tpm/tis.c
@@ -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;
}
diff --git a/src/drivers/i2c/tpm/tpm.c b/src/drivers/i2c/tpm/tpm.c
index 68b7042a64..c88dcdd4b9 100644
--- a/src/drivers/i2c/tpm/tpm.c
+++ b/src/drivers/i2c/tpm/tpm.c
@@ -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);
diff --git a/src/drivers/pc80/tpm/tis.c b/src/drivers/pc80/tpm/tis.c
index 5bb566297c..a7a3e9d72d 100644
--- a/src/drivers/pc80/tpm/tis.c
+++ b/src/drivers/pc80/tpm/tis.c
@@ -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;
diff --git a/src/drivers/spi/tpm/tpm.c b/src/drivers/spi/tpm/tpm.c
index 898d570a47..01f04f4a36 100644
--- a/src/drivers/spi/tpm/tpm.c
+++ b/src/drivers/spi/tpm/tpm.c
@@ -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;
}
diff --git a/src/mainboard/facebook/fbg1701/romstage.c b/src/mainboard/facebook/fbg1701/romstage.c
index c3d817b73b..41ae099d88 100644
--- a/src/mainboard/facebook/fbg1701/romstage.c
+++ b/src/mainboard/facebook/fbg1701/romstage.c
@@ -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;
diff --git a/src/mainboard/google/brya/mainboard.c b/src/mainboard/google/brya/mainboard.c
index a4603371af..638d40254f 100644
--- a/src/mainboard/google/brya/mainboard.c
+++ b/src/mainboard/google/brya/mainboard.c
@@ -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;
}
diff --git a/src/mainboard/google/dedede/mainboard.c b/src/mainboard/google/dedede/mainboard.c
index 444eef8be7..3abee01caa 100644
--- a/src/mainboard/google/dedede/mainboard.c
+++ b/src/mainboard/google/dedede/mainboard.c
@@ -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;
}
diff --git a/src/mainboard/google/volteer/mainboard.c b/src/mainboard/google/volteer/mainboard.c
index 7409a5bb35..4dc97c3637 100644
--- a/src/mainboard/google/volteer/mainboard.c
+++ b/src/mainboard/google/volteer/mainboard.c
@@ -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;
}
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);
diff --git a/src/security/tpm/tss/tcg-2.0/tss.c b/src/security/tpm/tss/tcg-2.0/tss.c
index 5b9aab82bf..e780bd24d3 100644
--- a/src/security/tpm/tss/tcg-2.0/tss.c
+++ b/src/security/tpm/tss/tcg-2.0/tss.c
@@ -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)
diff --git a/src/security/tpm/tss/vendor/cr50/cr50.c b/src/security/tpm/tss/vendor/cr50/cr50.c
index 5dbf0148bb..1711501323 100644
--- a/src/security/tpm/tss/vendor/cr50/cr50.c
+++ b/src/security/tpm/tss/vendor/cr50/cr50.c
@@ -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__);
diff --git a/src/security/vboot/mrc_cache_hash_tpm.c b/src/security/vboot/mrc_cache_hash_tpm.c
index f67eae48cb..07baed7eba 100644
--- a/src/security/vboot/mrc_cache_hash_tpm.c
+++ b/src/security/vboot/mrc_cache_hash_tpm.c
@@ -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;
}
diff --git a/src/security/vboot/secdata_tpm.c b/src/security/vboot/secdata_tpm.c
index fdf98cc41c..d19b47e609 100644
--- a/src/security/vboot/secdata_tpm.c
+++ b/src/security/vboot/secdata_tpm.c
@@ -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;
}
diff --git a/src/security/vboot/vbios_cache_hash_tpm.c b/src/security/vboot/vbios_cache_hash_tpm.c
index aa54f19e4c..6ad09ace8e 100644
--- a/src/security/vboot/vbios_cache_hash_tpm.c
+++ b/src/security/vboot/vbios_cache_hash_tpm.c
@@ -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;
diff --git a/src/security/vboot/vboot_logic.c b/src/security/vboot/vboot_logic.c
index 69cfaf8047..f6d8bad2e3 100644
--- a/src/security/vboot/vboot_logic.c
+++ b/src/security/vboot/vboot_logic.c
@@ -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);
}
}
diff --git a/src/vendorcode/eltan/security/mboot/mboot.c b/src/vendorcode/eltan/security/mboot/mboot.c
index ac7ce4be8e..783f587323 100644
--- a/src/vendorcode/eltan/security/mboot/mboot.c
+++ b/src/vendorcode/eltan/security/mboot/mboot.c
@@ -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;
}
diff --git a/src/vendorcode/eltan/security/verified_boot/vboot_check.c b/src/vendorcode/eltan/security/verified_boot/vboot_check.c
index a8c6cb537b..9ea31b877c 100644
--- a/src/vendorcode/eltan/security/verified_boot/vboot_check.c
+++ b/src/vendorcode/eltan/security/verified_boot/vboot_check.c
@@ -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");
}
diff --git a/src/vendorcode/google/chromeos/cr50_enable_update.c b/src/vendorcode/google/chromeos/cr50_enable_update.c
index aea804f026..abc132dd6e 100644
--- a/src/vendorcode/google/chromeos/cr50_enable_update.c
+++ b/src/vendorcode/google/chromeos/cr50_enable_update.c
@@ -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;
}
diff --git a/src/vendorcode/google/chromeos/cse_board_reset.c b/src/vendorcode/google/chromeos/cse_board_reset.c
index 7d19408726..87c49164c0 100644
--- a/src/vendorcode/google/chromeos/cse_board_reset.c
+++ b/src/vendorcode/google/chromeos/cse_board_reset.c
@@ -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;
}
diff --git a/src/vendorcode/google/chromeos/tpm2.c b/src/vendorcode/google/chromeos/tpm2.c
index a28b02eeaf..8e3a4ebb51 100644
--- a/src/vendorcode/google/chromeos/tpm2.c
+++ b/src/vendorcode/google/chromeos/tpm2.c
@@ -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);
}