Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b3bae33d authored by AnilKumar Chimata's avatar AnilKumar Chimata Committed by Gerrit - the friendly Code Review server
Browse files

qseecom: Enable crypto clocks for SSD listener service



Enable crypto clocks while servicing the SSD listener. Also protect
the FDE key creation, update and wipe functions with mutex lock to
avoid other user to intervene before completing the operation.

Change-Id: I088829743eb4c7a9c3e887bbcc2030d4c51a80fb
Signed-off-by: default avatarAnilKumar Chimata <anilc@codeaurora.org>
parent 50e0173f
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -79,6 +79,7 @@
#define SCM_MDTP_CIPHER_DIP		0x01

#define RPMB_SERVICE			0x2000
#define SSD_SERVICE			0x3000

#define QSEECOM_SEND_CMD_CRYPTO_TIMEOUT	2000
#define QSEECOM_LOAD_APP_CRYPTO_TIMEOUT	2000
@@ -1423,7 +1424,7 @@ static int __qseecom_process_incomplete_cmd(struct qseecom_dev_handle *data,
					ptr_svc->sb_virt, ptr_svc->sb_length,
						ION_IOC_CLEAN_INV_CACHES);

		if (lstnr == RPMB_SERVICE)
		if ((lstnr == RPMB_SERVICE) || (lstnr == SSD_SERVICE))
			__qseecom_enable_clk(CLK_QSEE);

		ret = qseecom_scm_call(SCM_SVC_TZSCHEDULER, 1,
@@ -1433,7 +1434,7 @@ static int __qseecom_process_incomplete_cmd(struct qseecom_dev_handle *data,
		if (ret) {
			pr_err("scm_call() failed with err: %d (app_id = %d)\n",
				ret, data->client.app_id);
			if (lstnr == RPMB_SERVICE)
			if ((lstnr == RPMB_SERVICE) || (lstnr == SSD_SERVICE))
				__qseecom_disable_clk(CLK_QSEE);
			return ret;
		}
@@ -1443,7 +1444,7 @@ static int __qseecom_process_incomplete_cmd(struct qseecom_dev_handle *data,
				resp->result, data->client.app_id, lstnr);
			ret = -EINVAL;
		}
		if (lstnr == RPMB_SERVICE)
		if ((lstnr == RPMB_SERVICE) || (lstnr == SSD_SERVICE))
			__qseecom_disable_clk(CLK_QSEE);

	}