Commit e79ca9e3ba45d560f4efbd0488d7468ab22aff38
1 parent
dbe3d77268
Exists in
emb_lf_v2022.04
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 (cherry picked from commit 8812d39018c23cc26afa43a97acf27427979c90c) (cherry picked from commit e79c079bd3f10d4fd80d33edeae184d53f80f706) (cherry picked from commit 8842c52d58c34a627f54b7999cec6bdbda1903b4)
Showing 1 changed file with 6 additions and 17 deletions Side-by-side Diff
lib/trusty/ql-tipc/hwcrypto.c
... | ... | @@ -80,10 +80,9 @@ |
80 | 80 | * @resp: the response buffer |
81 | 81 | * @resp_size_p: pointer to the size of the response buffer. changed to the |
82 | 82 | actual size of the response read from the secure side |
83 | - * @handle_rpmb: true if the request is expected to invoke RPMB callbacks | |
84 | 83 | */ |
85 | 84 | static int hwcrypto_do_tipc(uint32_t cmd, void *req, uint32_t req_size, void *resp, |
86 | - uint32_t *resp_size_p, bool handle_rpmb) | |
85 | + uint32_t *resp_size_p) | |
87 | 86 | { |
88 | 87 | int rc; |
89 | 88 | struct hwcrypto_message msg = { .cmd = cmd }; |
... | ... | @@ -99,16 +98,6 @@ |
99 | 98 | return rc; |
100 | 99 | } |
101 | 100 | |
102 | - if (handle_rpmb) { | |
103 | - /* handle any incoming RPMB requests */ | |
104 | - rc = rpmb_storage_proxy_poll(); | |
105 | - if (rc < 0) { | |
106 | - trusty_error("%s: failed (%d) to get RPMB requests\n", __func__, | |
107 | - rc); | |
108 | - return rc; | |
109 | - } | |
110 | - } | |
111 | - | |
112 | 101 | uint32_t resp_size = resp_size_p ? *resp_size_p : 0; |
113 | 102 | rc = hwcrypto_read_response(&msg, cmd, resp, resp_size); |
114 | 103 | if (rc < 0) { |
... | ... | @@ -188,7 +177,7 @@ |
188 | 177 | invalidate_dcache_range(start, end); |
189 | 178 | |
190 | 179 | int rc = hwcrypto_do_tipc(HWCRYPTO_HASH, (void*)&req, |
191 | - sizeof(req), NULL, 0, false); | |
180 | + sizeof(req), NULL, 0); | |
192 | 181 | |
193 | 182 | /* invalidate the dcache again before read to avoid coherency |
194 | 183 | * problem caused by speculative memory access by the CPU. |
... | ... | @@ -224,7 +213,7 @@ |
224 | 213 | invalidate_dcache_range(start, end); |
225 | 214 | |
226 | 215 | int rc = hwcrypto_do_tipc(HWCRYPTO_ENCAP_BLOB, (void*)&req, |
227 | - sizeof(req), NULL, 0, false); | |
216 | + sizeof(req), NULL, 0); | |
228 | 217 | |
229 | 218 | /* invalidate the dcache again before read to avoid coherency |
230 | 219 | * problem caused by speculative memory access by the CPU. |
... | ... | @@ -251,7 +240,7 @@ |
251 | 240 | invalidate_dcache_range(start, end); |
252 | 241 | |
253 | 242 | int rc = hwcrypto_do_tipc(HWCRYPTO_GEN_RNG, (void*)&req, |
254 | - sizeof(req), NULL, 0, false); | |
243 | + sizeof(req), NULL, 0); | |
255 | 244 | |
256 | 245 | /* invalidate the dcache again before read to avoid coherency |
257 | 246 | * problem caused by speculative memory access by the CPU. |
... | ... | @@ -278,7 +267,7 @@ |
278 | 267 | invalidate_dcache_range(start, end); |
279 | 268 | |
280 | 269 | int rc = hwcrypto_do_tipc(HWCRYPTO_GEN_BKEK, (void*)&req, |
281 | - sizeof(req), NULL, 0, false); | |
270 | + sizeof(req), NULL, 0); | |
282 | 271 | |
283 | 272 | /* invalidate the dcache again before read to avoid coherency |
284 | 273 | * problem caused by speculative memory access by the CPU. |
... | ... | @@ -289,6 +278,6 @@ |
289 | 278 | |
290 | 279 | int hwcrypto_lock_boot_state(void) |
291 | 280 | { |
292 | - return hwcrypto_do_tipc(HWCRYPTO_LOCK_BOOT_STATE, NULL, 0, NULL, 0, false); | |
281 | + return hwcrypto_do_tipc(HWCRYPTO_LOCK_BOOT_STATE, NULL, 0, NULL, 0); | |
293 | 282 | } |