summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJi Luo <ji.luo@nxp.com>2020-06-18 10:01:19 +0800
committerJi Luo <ji.luo@nxp.com>2020-06-18 15:25:40 +0800
commit8812d39018c23cc26afa43a97acf27427979c90c (patch)
treee3f9673f4f73d21c91a474d76587479dba495eef /lib
parent85e0d429d19b8f9a62369a5f20e088644c488b1e (diff)
MA-17387 Remove the rpmb handle flag in hwcrypto
The handle_rpmb flag should indicate whether the call will invoke RPMB callbacks, which has been removed by below commit: commit dfd911856d31fd91eb4e3c1edb1d691723c6edaf Author: Roberto Pereira <rpere@google.com> Date: Thu Nov 2 15:09:20 2017 -0700 ql-tipc: trusty_ipc: Change ipc polling to be per device This allows ipc devices to provide service callbacks (e.g. rpmb) transparently to the application instead of needing to have prior knowledge of the expected request and having to poll the individual services' channels separately. Change-Id: I3257ae5e429f4a0c279f070d750b56c5600c38d5 Sync the change for hwcrypto, it will help remove some build warnings. Test: builds and boots with trusty. Signed-off-by: Ji Luo <ji.luo@nxp.com> Change-Id: I696b13d9d509d5983c934df5ee6fb36e46f4c884
Diffstat (limited to 'lib')
-rw-r--r--lib/trusty/ql-tipc/hwcrypto.c23
1 files changed, 6 insertions, 17 deletions
diff --git a/lib/trusty/ql-tipc/hwcrypto.c b/lib/trusty/ql-tipc/hwcrypto.c
index f638cf4368..cab874bb04 100644
--- a/lib/trusty/ql-tipc/hwcrypto.c
+++ b/lib/trusty/ql-tipc/hwcrypto.c
@@ -79,10 +79,9 @@ static int hwcrypto_read_response(struct hwcrypto_message *msg, uint32_t cmd, vo
* @resp: the response buffer
* @resp_size_p: pointer to the size of the response buffer. changed to the
actual size of the response read from the secure side
- * @handle_rpmb: true if the request is expected to invoke RPMB callbacks
*/
static int hwcrypto_do_tipc(uint32_t cmd, void *req, uint32_t req_size, void *resp,
- uint32_t *resp_size_p, bool handle_rpmb)
+ uint32_t *resp_size_p)
{
int rc;
struct hwcrypto_message msg = { .cmd = cmd };
@@ -98,16 +97,6 @@ static int hwcrypto_do_tipc(uint32_t cmd, void *req, uint32_t req_size, void *re
return rc;
}
- if (handle_rpmb) {
- /* handle any incoming RPMB requests */
- rc = rpmb_storage_proxy_poll();
- if (rc < 0) {
- trusty_error("%s: failed (%d) to get RPMB requests\n", __func__,
- rc);
- return rc;
- }
- }
-
uint32_t resp_size = resp_size_p ? *resp_size_p : 0;
rc = hwcrypto_read_response(&msg, cmd, resp, resp_size);
if (rc < 0) {
@@ -187,7 +176,7 @@ int hwcrypto_hash(uint32_t in_addr, uint32_t in_len, uint32_t out_addr,
invalidate_dcache_range(start, end);
int rc = hwcrypto_do_tipc(HWCRYPTO_HASH, (void*)&req,
- sizeof(req), NULL, 0, false);
+ sizeof(req), NULL, 0);
/* invalidate the dcache again before read to avoid coherency
* problem caused by speculative memory access by the CPU.
@@ -223,7 +212,7 @@ int hwcrypto_gen_blob(uint32_t plain_pa,
invalidate_dcache_range(start, end);
int rc = hwcrypto_do_tipc(HWCRYPTO_ENCAP_BLOB, (void*)&req,
- sizeof(req), NULL, 0, false);
+ sizeof(req), NULL, 0);
/* invalidate the dcache again before read to avoid coherency
* problem caused by speculative memory access by the CPU.
@@ -250,7 +239,7 @@ int hwcrypto_gen_rng(uint32_t buf, uint32_t len)
invalidate_dcache_range(start, end);
int rc = hwcrypto_do_tipc(HWCRYPTO_GEN_RNG, (void*)&req,
- sizeof(req), NULL, 0, false);
+ sizeof(req), NULL, 0);
/* invalidate the dcache again before read to avoid coherency
* problem caused by speculative memory access by the CPU.
@@ -277,7 +266,7 @@ int hwcrypto_gen_bkek(uint32_t buf, uint32_t len)
invalidate_dcache_range(start, end);
int rc = hwcrypto_do_tipc(HWCRYPTO_GEN_BKEK, (void*)&req,
- sizeof(req), NULL, 0, false);
+ sizeof(req), NULL, 0);
/* invalidate the dcache again before read to avoid coherency
* problem caused by speculative memory access by the CPU.
@@ -288,5 +277,5 @@ int hwcrypto_gen_bkek(uint32_t buf, uint32_t len)
int hwcrypto_lock_boot_state(void)
{
- return hwcrypto_do_tipc(HWCRYPTO_LOCK_BOOT_STATE, NULL, 0, NULL, 0, false);
+ return hwcrypto_do_tipc(HWCRYPTO_LOCK_BOOT_STATE, NULL, 0, NULL, 0);
}