diff options
author | Luo Ji <ji.luo@nxp.com> | 2018-11-09 13:12:32 +0800 |
---|---|---|
committer | Luo Ji <ji.luo@nxp.com> | 2018-11-09 16:26:24 +0800 |
commit | a37a72c84f1e4d92b6de609cf25903e6a28f8d07 (patch) | |
tree | aec83fbdff0aa3bfa6d4c51c8071eac5cc018dda /lib | |
parent | f0d02f2da5e475d1e91e92aac3e6a573926fe10a (diff) |
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>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/avb/fsl/fsl_avbkey.c | 6 | ||||
-rw-r--r-- | lib/trusty/ql-tipc/libtipc.c | 7 |
2 files changed, 7 insertions, 6 deletions
diff --git a/lib/avb/fsl/fsl_avbkey.c b/lib/avb/fsl/fsl_avbkey.c index d6031452abc..097e00dd82b 100644 --- a/lib/avb/fsl/fsl_avbkey.c +++ b/lib/avb/fsl/fsl_avbkey.c @@ -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. */ diff --git a/lib/trusty/ql-tipc/libtipc.c b/lib/trusty/ql-tipc/libtipc.c index b2814b6dca4..2f3a663aa60 100644 --- a/lib/trusty/ql-tipc/libtipc.c +++ b/lib/trusty/ql-tipc/libtipc.c @@ -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; |