summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorAmirreza Zarrabi <amirreza.zarrabi@oss.qualcomm.com>2025-09-12 07:07:40 +0300
committerBjorn Andersson <andersson@kernel.org>2025-09-15 16:42:53 +0300
commit8aa1e3a6f0ffbcfdf3bd7d87feb9090f96c54bc4 (patch)
tree3039e883e4b316e168786f98db854a951a0cc455 /include/linux
parent8f5ae30d69d7543eee0d70083daf4de8fe15d585 (diff)
downloadlinux-8aa1e3a6f0ffbcfdf3bd7d87feb9090f96c54bc4.tar.xz
firmware: qcom: tzmem: export shm_bridge create/delete
Anyone with access to contiguous physical memory should be able to share memory with QTEE using shm_bridge. Tested-by: Neil Armstrong <neil.armstrong@linaro.org> Tested-by: Harshal Dev <quic_hdev@quicinc.com> Reviewed-by: Kuldeep Singh <quic_kuldsing@quicinc.com> Signed-off-by: Amirreza Zarrabi <amirreza.zarrabi@oss.qualcomm.com> Link: https://lore.kernel.org/r/20250911-qcom-tee-using-tee-ss-without-mem-obj-v12-1-17f07a942b8d@oss.qualcomm.com Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/firmware/qcom/qcom_tzmem.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/include/linux/firmware/qcom/qcom_tzmem.h b/include/linux/firmware/qcom/qcom_tzmem.h
index b83b63a0c049..48ac0e5454c7 100644
--- a/include/linux/firmware/qcom/qcom_tzmem.h
+++ b/include/linux/firmware/qcom/qcom_tzmem.h
@@ -53,4 +53,19 @@ DEFINE_FREE(qcom_tzmem, void *, if (_T) qcom_tzmem_free(_T))
phys_addr_t qcom_tzmem_to_phys(void *ptr);
+#if IS_ENABLED(CONFIG_QCOM_TZMEM_MODE_SHMBRIDGE)
+int qcom_tzmem_shm_bridge_create(phys_addr_t paddr, size_t size, u64 *handle);
+void qcom_tzmem_shm_bridge_delete(u64 handle);
+#else
+static inline int qcom_tzmem_shm_bridge_create(phys_addr_t paddr,
+ size_t size, u64 *handle)
+{
+ return 0;
+}
+
+static inline void qcom_tzmem_shm_bridge_delete(u64 handle)
+{
+}
+#endif
+
#endif /* __QCOM_TZMEM */