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

Commit 5b0eaef4 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "profiler: Add a communication interface between userspace and tz services"

parents b709b7ac 0675c710
Loading
Loading
Loading
Loading
+21 −0
Original line number Diff line number Diff line
@@ -2478,6 +2478,27 @@ int __init scm_mem_protection_init_do(struct device *dev)
}
#endif

int __qcom_scm_ddrbw_profiler(struct device *dev, phys_addr_t in_buf,
	size_t in_buf_size, phys_addr_t out_buf, size_t out_buf_size)
{
	int ret;
	struct qcom_scm_desc desc = {
		.svc = QCOM_SCM_SVC_INFO,
		.cmd = TZ_SVC_BW_PROF_ID,
		.owner = ARM_SMCCC_OWNER_SIP,
	};

	desc.args[0] = in_buf;
	desc.args[1] = in_buf_size;
	desc.args[2] = out_buf;
	desc.args[3] = out_buf_size;
	desc.arginfo = QCOM_SCM_ARGS(4, QCOM_SCM_RW, QCOM_SCM_VAL, QCOM_SCM_RW,
								 QCOM_SCM_VAL);
	ret = qcom_scm_call(dev, &desc);

	return ret;
}

void __qcom_scm_init(void)
{

+8 −0
Original line number Diff line number Diff line
@@ -1059,6 +1059,14 @@ int qcom_scm_qseecom_call_noretry(u32 cmd_id, struct scm_desc *desc)
}
EXPORT_SYMBOL(qcom_scm_qseecom_call_noretry);

int qcom_scm_ddrbw_profiler(phys_addr_t in_buf,
	size_t in_buf_size, phys_addr_t out_buf, size_t out_buf_size)
{
	return __qcom_scm_ddrbw_profiler(__scm ? __scm->dev : NULL, in_buf,
			in_buf_size, out_buf, out_buf_size);
}
EXPORT_SYMBOL(qcom_scm_ddrbw_profiler);

/**
 * qcom_scm_is_available() - Checks if SCM is available
 */
+4 −0
Original line number Diff line number Diff line
@@ -288,6 +288,10 @@ extern int __init scm_mem_protection_init_do(struct device *dev);

#endif

#define TZ_SVC_BW_PROF_ID		0x07 /* ddr profiler */
extern int __qcom_scm_ddrbw_profiler(struct device *dev, phys_addr_t in_buf,
	size_t in_buf_size, phys_addr_t out_buf, size_t out_buf_size);

/* common error codes */
#define QCOM_SCM_V2_EBUSY	-12
#define QCOM_SCM_ENOMEM		-5
+8 −0
Original line number Diff line number Diff line
@@ -499,6 +499,14 @@ config HDCP_QSEECOM
          via the QSEECOM Driver and also communicates with the Receiver via
          APIs exposed by the interface driver.

config PROFILER
	tristate "Qualcomm Technologies, Inc. trustzone Communicator driver"
	help
	  Provides a communication interface between userspace and
	  trustzone using Secure Channel Manager (SCM) interface.
	  It exposes APIs for userspace to get system profiling
	  information.

config WIGIG_SENSING_SPI
	tristate "Sensing over 60GHz using wil6210 / SPI bus"
	depends on SPI && WIL6210
+1 −0
Original line number Diff line number Diff line
@@ -62,5 +62,6 @@ obj-$(CONFIG_UID_SYS_STATS) += uid_sys_stats.o
obj-$(CONFIG_QSEECOM)		+= qseecom-mod.o
qseecom-mod-y			:= qseecom.o
qseecom-mod-$(CONFIG_COMPAT)	+= compat_qseecom.o
obj-$(CONFIG_PROFILER)			+= profiler.o
obj-$(CONFIG_WIGIG_SENSING_SPI)	+= wigig_sensing.o
obj-$(CONFIG_HISI_HIKEY_USB)	+= hisi_hikey_usb.o
Loading