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

Commit e7d75b5c authored by Zhen Kong's avatar Zhen Kong Committed by Vikram Mulukutla
Browse files

firmware: qcom: tz_log: Add support for the new scm_call2 API



The scm library has added support for a new secure world
interface that is more aligned to the ARMv8 SMC calling
convention. Use the new API while maintaining backward
compatibility.

Change-Id: I1fcf96b3a4ca55a7cd8c928d0f526250be5085bb
Signed-off-by: default avatarVikram Mulukutla <markivx@codeaurora.org>
Signed-off-by: default avatarZhen Kong <zkong@codeaurora.org>
parent a59b27ed
Loading
Loading
Loading
Loading
+13 −3
Original line number Original line Diff line number Diff line
@@ -586,9 +586,19 @@ static void tzdbg_register_qsee_log_buf(void)
	req.phy_addr = (uint32_t)pa;
	req.phy_addr = (uint32_t)pa;
	req.len = len;
	req.len = len;


	if (!is_scm_armv8()) {
		/*  SCM_CALL  to register the log buffer */
		/*  SCM_CALL  to register the log buffer */
		ret = scm_call(SCM_SVC_TZSCHEDULER, 1,  &req, sizeof(req),
		ret = scm_call(SCM_SVC_TZSCHEDULER, 1,  &req, sizeof(req),
			&resp, sizeof(resp));
			&resp, sizeof(resp));
	} else {
		struct scm_desc desc = {0};
		desc.args[0] = (uint32_t)pa;
		desc.args[1] = len;
		desc.arginfo = 0x22;
		ret = scm_call2(SCM_QSEEOS_FNID(1, 6), &desc);
		resp.result = desc.ret[0];
	}

	if (ret) {
	if (ret) {
		pr_err("%s: scm_call to register log buffer failed\n",
		pr_err("%s: scm_call to register log buffer failed\n",
			__func__);
			__func__);