On 3/3/2024 7:01 AM, Bartosz Golaszewski wrote:
> From: Bartosz Golaszewski <[email protected]>
>
> We have several SCM calls that require passing buffers to the TrustZone
> on top of the SMC core which allocates memory for calls that require
> more than 4 arguments.
>
> Currently every user does their own thing which leads to code
> duplication. Many users call dma_alloc_coherent() for every call which
> is terribly unperformant (speed- and size-wise).
>
> Provide a set of library functions for creating and managing pools of
> memory which is suitable for sharing with the TrustZone, that is:
> page-aligned, contiguous and non-cachable as well as provides a way of
> mapping of kernel virtual addresses to physical space.
>
> Make the allocator ready for extending with additional modes of operation
> which will allow us to support the SHM bridge safety mechanism once all
> users convert.
>
> Signed-off-by: Bartosz Golaszewski <[email protected]>
> Reviewed-by: Andrew Halaney <[email protected]>
> Tested-by: Andrew Halaney <[email protected]> # sc8280xp-lenovo-thinkpad-x13s
> Tested-by: Deepti Jaggi <[email protected]> #sa8775p-ride
> Reviewed-by: Elliot Berman <[email protected]>
> ---
> MAINTAINERS | 8 +
> drivers/firmware/qcom/Kconfig | 20 ++
> drivers/firmware/qcom/Makefile | 1 +
> drivers/firmware/qcom/qcom_tzmem.c | 392 +++++++++++++++++++++++
> drivers/firmware/qcom/qcom_tzmem.h | 13 +
> include/linux/firmware/qcom/qcom_tzmem.h | 56 ++++
> 6 files changed, 490 insertions(+)
> create mode 100644 drivers/firmware/qcom/qcom_tzmem.c
> create mode 100644 drivers/firmware/qcom/qcom_tzmem.h
> create mode 100644 include/linux/firmware/qcom/qcom_tzmem.h
>
> diff --git a/MAINTAINERS b/MAINTAINERS
> index 1794b8d7c76b..c1138c709365 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -18327,6 +18327,14 @@ L: [email protected]
> S: Maintained
> F: drivers/firmware/qcom/qcom_qseecom.c
>
> +QUALCOMM TRUST ZONE MEMORY ALLOCATOR
> +M: Bartosz Golaszewski <[email protected]>
> +L: [email protected]
> +S: Maintained
> +F: drivers/firmware/qcom/qcom_tzmem.c
> +F: drivers/firmware/qcom/qcom_tzmem.h
> +F: include/linux/firmware/qcom/qcom_tzmem.h
> +
> QUALCOMM QSEECOM UEFISECAPP DRIVER
> M: Maximilian Luz <[email protected]>
> L: [email protected]
entries should be in alphabetic order so at a minimum QUALCOMM TRUST...
should be after QUALCOMM QSEECOM...
seems your addition belong just before QUALCOMM TSENS THERMAL DRIVER
/jeff