mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-05 19:31:57 -04:00
smcinvoke: Update the correct result from qseecom
In case when a listener request comes from secure side to smcinvoke, we invoke qseecom for processing of listener request. It maybe the case that after this request, secure side may request for another callback request. In this flow, we need to update the correct result from qseecom as 0 so as to indicate that qseecom's job was successfully finished and now smcinvoke has to take care of the callback request further. This condition is again checked at smcinvoke side and decision to marshal out is taken accordingly. Change-Id: I5d6be3292ef11ac2d84fd287bb8f1e9f91dc1b56 Signed-off-by: Anmolpreet Kaur <anmolpre@codeaurora.org>
This commit is contained in:
parent
a6ec4c9e0d
commit
5e6faa5d18
2 changed files with 8 additions and 7 deletions
|
|
@ -2655,6 +2655,11 @@ err_resp:
|
|||
pr_warn("get cback req app_id = %d, resp->data = %d\n",
|
||||
data->client.app_id, resp->data);
|
||||
resp->resp_type = SMCINVOKE_RESULT_INBOUND_REQ_NEEDED;
|
||||
/* We are here because scm call sent to TZ has requested
|
||||
* for another callback request. This call has been a
|
||||
* success and hence setting result = 0
|
||||
*/
|
||||
resp->result = 0;
|
||||
break;
|
||||
default:
|
||||
pr_err("fail:resp res= %d,app_id = %d,lstr = %d\n",
|
||||
|
|
|
|||
|
|
@ -1282,13 +1282,9 @@ static int prepare_send_scm_msg(const uint8_t *in_buf, phys_addr_t in_paddr,
|
|||
response_type == QSEOS_RESULT_BLOCKED_ON_LISTENER) {
|
||||
ret = qseecom_process_listener_from_smcinvoke(
|
||||
&req->result, &response_type, &data);
|
||||
/*
|
||||
* new scm APIs do not provide complete response i.e. res[0-2],
|
||||
* we loose some values returned from QSEECom APIs. so we need to
|
||||
* populate result from response type i.e. res[1]
|
||||
*/
|
||||
req->result = response_type;
|
||||
if (!req->result) {
|
||||
|
||||
if (!req->result &&
|
||||
response_type != SMCINVOKE_RESULT_INBOUND_REQ_NEEDED) {
|
||||
ret = marshal_out_invoke_req(in_buf,
|
||||
in_buf_len, req, args_buf);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue