summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJi Luo <ji.luo@nxp.com>2018-11-12 16:42:46 +0800
committerJi Luo <ji.luo@nxp.com>2018-11-12 18:18:23 +0800
commit1b2d27563de3dcaa0c6caf447ae074f104c16ad1 (patch)
tree312011d43e320a65e1f6da727cf957f87c9f42ff /lib
parente48ceaae247211f53effd33371d0bfe20b8b867d (diff)
MA-13365 [Trusty] Fix imx8q hang when rpmb key not set
Commit "ql-tipc: trusty_ipc: Change ipc polling to be per device" removes rpmb_storage_proxy_poll() call in avb_do_tipc() which will return early if the rpmb proxy service isn't initialized properly, this will make boards hang if the rpmb key is not set. Skip initializing AVB and Keymaster client if the rpmb key hasn't been set, but keep the hwcrypto client initialization since we need it to generate the rpmb key blob. Test: Build and boot ok on imx8q. Change-Id: I1ead849e812da55edae8b739d9ae56a7d4951af4 Signed-off-by: Ji Luo <ji.luo@nxp.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/trusty/ql-tipc/libtipc.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/lib/trusty/ql-tipc/libtipc.c b/lib/trusty/ql-tipc/libtipc.c
index 9dd15a3567..f1d523e763 100644
--- a/lib/trusty/ql-tipc/libtipc.c
+++ b/lib/trusty/ql-tipc/libtipc.c
@@ -106,20 +106,20 @@ int trusty_ipc_init(void)
#else
return rc;
#endif
- }
-
- trusty_info("Initializing Trusty AVB client\n");
- rc = avb_tipc_init(_ipc_dev);
- if (rc != 0) {
- trusty_error("Initlializing Trusty AVB client failed (%d)\n", rc);
- return rc;
- }
+ } else {
+ trusty_info("Initializing Trusty AVB client\n");
+ rc = avb_tipc_init(_ipc_dev);
+ if (rc != 0) {
+ trusty_error("Initlializing Trusty AVB client failed (%d)\n", rc);
+ return rc;
+ }
- trusty_info("Initializing Trusty Keymaster client\n");
- rc = km_tipc_init(_ipc_dev);
- if (rc != 0) {
- trusty_error("Initlializing Trusty Keymaster client failed (%d)\n", rc);
- return rc;
+ trusty_info("Initializing Trusty Keymaster client\n");
+ rc = km_tipc_init(_ipc_dev);
+ if (rc != 0) {
+ trusty_error("Initlializing Trusty Keymaster client failed (%d)\n", rc);
+ return rc;
+ }
}
#ifdef CONFIG_ANDROID_AUTO_SUPPORT