qseecom: add new SCM ID to register listener when smcinvoke is supported
Add new SCM ID to register listener when smcinvoke is supported. Then TZ, depending on how the listener has been registered, will either behave in the old way (i.e. rsp[1]=QSEE_LISTENER_ID), or the new way (rsp[1]=app_id) when smcinvoke is supported. And qseecom will first to register listener with new SCM ID, if failed, then fallback to use old ID. Change-Id: Ia27055db6ec8f26705669ee913919b29461121ca Signed-off-by: Zhen Kong <zkong@codeaurora.org>
This commit is contained in:
parent
15632ada36
commit
3f3f20e347
2 changed files with 11 additions and 2 deletions
|
@ -562,7 +562,6 @@ static int qseecom_scm_call2(uint32_t svc_id, uint32_t tz_cmd_id,
|
|||
case QSEOS_REGISTER_LISTENER: {
|
||||
struct qseecom_register_listener_ireq *req;
|
||||
struct qseecom_register_listener_64bit_ireq *req_64bit;
|
||||
smc_id = TZ_OS_REGISTER_LISTENER_ID;
|
||||
desc.arginfo =
|
||||
TZ_OS_REGISTER_LISTENER_ID_PARAM_ID;
|
||||
if (qseecom.qsee_version < QSEE_VERSION_40) {
|
||||
|
@ -579,8 +578,15 @@ static int qseecom_scm_call2(uint32_t svc_id, uint32_t tz_cmd_id,
|
|||
desc.args[1] = req_64bit->sb_ptr;
|
||||
desc.args[2] = req_64bit->sb_len;
|
||||
}
|
||||
smc_id = TZ_OS_REGISTER_LISTENER_SMCINVOKE_ID;
|
||||
__qseecom_reentrancy_check_if_no_app_blocked(smc_id);
|
||||
ret = scm_call2(smc_id, &desc);
|
||||
if (ret) {
|
||||
smc_id = TZ_OS_REGISTER_LISTENER_ID;
|
||||
__qseecom_reentrancy_check_if_no_app_blocked(
|
||||
smc_id);
|
||||
ret = scm_call2(smc_id, &desc);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case QSEOS_DEREGISTER_LISTENER: {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2013-2016, The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2013-2017, The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 and
|
||||
|
@ -511,6 +511,9 @@ __packed struct qseecom_continue_blocked_request_ireq {
|
|||
#define TZ_OS_REGISTER_LISTENER_ID \
|
||||
TZ_SYSCALL_CREATE_SMC_ID(TZ_OWNER_QSEE_OS, TZ_SVC_LISTENER, 0x01)
|
||||
|
||||
#define TZ_OS_REGISTER_LISTENER_SMCINVOKE_ID \
|
||||
TZ_SYSCALL_CREATE_SMC_ID(TZ_OWNER_QSEE_OS, TZ_SVC_LISTENER, 0x06)
|
||||
|
||||
#define TZ_OS_REGISTER_LISTENER_ID_PARAM_ID \
|
||||
TZ_SYSCALL_CREATE_PARAM_ID_3( \
|
||||
TZ_SYSCALL_PARAM_TYPE_VAL, TZ_SYSCALL_PARAM_TYPE_BUF_RW, \
|
||||
|
|
Loading…
Add table
Reference in a new issue