MA-13357 [Trusty] Init hwcrypto service even rpmb key not set
RPMB storage proxy service will return fail if the rpmb key is not correct, we should not return early here if the rpmb key has not been set because we still need to initialize the hwcrypto service to generate the rpmb key blob. This commit also adds more hint when set the rpmb key. Change-Id: I8ee59e4e277b545283d63b1070e671d508dbe0c2 Signed-off-by: Luo Ji <ji.luo@nxp.com>
This commit is contained in:
parent
f0d02f2da5
commit
a37a72c84f
|
|
@ -1533,7 +1533,7 @@ int fastboot_set_rpmb_key(uint8_t *staged_buf, uint32_t key_size)
|
|||
ret = -1;
|
||||
goto fail;
|
||||
} else
|
||||
printf("RPMB key programed successfully!");
|
||||
printf("RPMB key programed successfully!\n");
|
||||
|
||||
/* Generate keyblob with CAAM. */
|
||||
kp.rpmb_keyblob_len = RPMBKEY_LENGTH + CAAM_PAD;
|
||||
|
|
@ -1543,7 +1543,9 @@ int fastboot_set_rpmb_key(uint8_t *staged_buf, uint32_t key_size)
|
|||
printf("ERROR - generate rpmb key blob error!\n");
|
||||
ret = -1;
|
||||
goto fail;
|
||||
}
|
||||
} else
|
||||
printf("RPMB key blob generated!\n");
|
||||
|
||||
memcpy(kp.rpmb_keyblob, blob, kp.rpmb_keyblob_len);
|
||||
|
||||
/* Store the rpmb key blob to last block of boot1 partition. */
|
||||
|
|
|
|||
|
|
@ -95,11 +95,10 @@ int trusty_ipc_init(void)
|
|||
trusty_error("RPMB key was destroyed!\n");
|
||||
hang();
|
||||
} else {
|
||||
/* rpmb key hasn't been set, use software
|
||||
* keymaster and return earily.
|
||||
*/
|
||||
/* rpmb key hasn't been set, use software keymaster.
|
||||
* Don't return here because we want to initalize the
|
||||
* hardware crypto service to set rpmb key. */
|
||||
env_set("keystore", "software");
|
||||
return rc;
|
||||
}
|
||||
#else
|
||||
return rc;
|
||||
|
|
|
|||
Loading…
Reference in New Issue