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:
@@ -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;
|
||||
}
|
||||
|
@@ -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");
|
||||
}
|
||||
|
@@ -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;
|
||||
}
|
||||
|
@@ -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;
|
||||
}
|
||||
|
||||
|
@@ -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);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user