tee: qcom: enable TEE_IOC_SHM_ALLOC ioctl
authorAmirreza Zarrabi <amirreza.zarrabi@oss.qualcomm.com>
Fri, 12 Sep 2025 04:07:49 +0000 (21:07 -0700)
committerJens Wiklander <jens.wiklander@linaro.org>
Mon, 15 Sep 2025 15:34:06 +0000 (17:34 +0200)
commit87ab676d909b192000342e6c301fcd13eaa17dbd
tree9b494fda85b5ff86c1e31fa5f079d22a0b9d15ef
parent0f7bfdcb7c37ae826ba6f1fde05d31040a97fd77
tee: qcom: enable TEE_IOC_SHM_ALLOC ioctl

Enable userspace to allocate shared memory with QTEE. Since
QTEE handles shared memory as object, a wrapper is implemented
to represent tee_shm as an object. The shared memory identifier,
obtained through TEE_IOC_SHM_ALLOC, is transferred to the driver using
TEE_IOCTL_PARAM_ATTR_TYPE_OBJREF_INPUT/OUTPUT.

Tested-by: Neil Armstrong <neil.armstrong@linaro.org>
Acked-by: Sumit Garg <sumit.garg@oss.qualcomm.com>
Tested-by: Harshal Dev <quic_hdev@quicinc.com>
Signed-off-by: Amirreza Zarrabi <amirreza.zarrabi@oss.qualcomm.com>
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
drivers/tee/qcomtee/Makefile
drivers/tee/qcomtee/call.c
drivers/tee/qcomtee/mem_obj.c [new file with mode: 0644]
drivers/tee/qcomtee/primordial_obj.c
drivers/tee/qcomtee/qcomtee.h
drivers/tee/qcomtee/shm.c