treewide: convert to tpm_result_t
Convert TPM functions to return TPM error codes(referred to as tpm_result_t) values to match the TCG standard. BUG=b:296439237 TEST=build and boot to Skyrim BRANCH=None Change-Id: Ifdf9ff6c2a1f9b938dbb04d245799391115eb6b1 Signed-off-by: Jon Murphy <jpmurphy@google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/77666 Reviewed-by: Raul Rangel <rrangel@chromium.org> Reviewed-by: Matt DeVillier <matt.devillier@amd.corp-partner.google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
parent
53fc667943
commit
d7b8dc9cf5
44 changed files with 734 additions and 653 deletions
|
|
@ -25,7 +25,7 @@ void __weak mainboard_prepare_cr50_reset(void) {}
|
|||
*/
|
||||
static int cr50_is_reset_needed(void)
|
||||
{
|
||||
int rc;
|
||||
tpm_result_t rc;
|
||||
uint8_t tpm_mode;
|
||||
|
||||
rc = tlcl_cr50_get_tpm_mode(&tpm_mode);
|
||||
|
|
@ -70,7 +70,7 @@ static int cr50_is_reset_needed(void)
|
|||
|
||||
static void enable_update(void *unused)
|
||||
{
|
||||
int rc;
|
||||
tpm_result_t rc;
|
||||
int cr50_reset_reqd = 0;
|
||||
uint8_t num_restored_headers;
|
||||
|
||||
|
|
@ -84,7 +84,7 @@ static void enable_update(void *unused)
|
|||
|
||||
rc = tlcl_lib_init();
|
||||
|
||||
if (rc != VB2_SUCCESS) {
|
||||
if (rc != TPM_SUCCESS) {
|
||||
printk(BIOS_ERR, "tlcl_lib_init() failed for CR50 update: %#x\n",
|
||||
rc);
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@
|
|||
|
||||
void cse_board_reset(void)
|
||||
{
|
||||
int rc;
|
||||
tpm_result_t rc;
|
||||
struct cr50_firmware_version version;
|
||||
|
||||
if (CONFIG(CSE_RESET_CLEAR_EC_AP_IDLE_FLAG))
|
||||
|
|
@ -22,7 +22,7 @@ void cse_board_reset(void)
|
|||
if (CONFIG(TPM2) && CONFIG(TPM_GOOGLE_CR50)) {
|
||||
/* Initialize TPM and get the cr50 firmware version. */
|
||||
rc = tlcl_lib_init();
|
||||
if (rc != VB2_SUCCESS) {
|
||||
if (rc != TPM_SUCCESS) {
|
||||
printk(BIOS_ERR, "tlcl_lib_init() failed: %#x\n", rc);
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
static void disable_platform_hierarchy(void *unused)
|
||||
{
|
||||
int rc;
|
||||
tpm_result_t rc;
|
||||
|
||||
if (!CONFIG(TPM2))
|
||||
return;
|
||||
|
|
@ -17,7 +17,7 @@ static void disable_platform_hierarchy(void *unused)
|
|||
|
||||
rc = tlcl_lib_init();
|
||||
|
||||
if (rc != VB2_SUCCESS) {
|
||||
if (rc != TPM_SUCCESS) {
|
||||
printk(BIOS_ERR, "tlcl_lib_init() failed: %#x\n", rc);
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue