[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240620155335645-0700.eberman@hu-eberman-lv.qualcomm.com>
Date: Thu, 20 Jun 2024 15:54:23 -0700
From: Elliot Berman <quic_eberman@...cinc.com>
To: Bartosz Golaszewski <brgl@...ev.pl>
CC: Bjorn Andersson <andersson@...nel.org>,
Konrad Dybcio
<konrad.dybcio@...aro.org>,
Rob Herring <robh@...nel.org>,
"Krzysztof
Kozlowski" <krzk+dt@...nel.org>,
Conor Dooley <conor+dt@...nel.org>,
"Robert
Marko" <robimarko@...il.com>,
Das Srinagesh <quic_gurus@...cinc.com>,
"Bartosz Golaszewski" <bartosz.golaszewski@...aro.org>,
Maximilian Luz
<luzmaximilian@...il.com>,
Catalin Marinas <catalin.marinas@....com>,
"Will
Deacon" <will@...nel.org>,
Srini Kandagatla <srinivas.kandagatla@...aro.org>,
Arnd Bergmann <arnd@...db.de>, Alex Elder <elder@...nel.org>,
<linux-arm-msm@...r.kernel.org>, <devicetree@...r.kernel.org>,
<linux-kernel@...r.kernel.org>, <linux-arm-kernel@...ts.infradead.org>,
<kernel@...cinc.com>, Andrew Halaney <ahalaney@...hat.com>,
Deepti Jaggi
<quic_djaggi@...cinc.com>
Subject: Re: [PATCH v10 13/15] firmware: qcom: scm: clarify the comment in
qcom_scm_pas_init_image()
On Mon, May 27, 2024 at 02:55:03PM +0200, Bartosz Golaszewski wrote:
> From: Bartosz Golaszewski <bartosz.golaszewski@...aro.org>
>
> The "memory protection" mechanism mentioned in the comment is the SHM
> Bridge. This is also the reason why we do not convert this call to using
> the TZ memory allocator.
>
> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@...aro.org>
> Tested-by: Andrew Halaney <ahalaney@...hat.com> # sc8280xp-lenovo-thinkpad-x13s
> Tested-by: Deepti Jaggi <quic_djaggi@...cinc.com> #sa8775p-ride
> Reviewed-by: Elliot Berman <quic_eberman@...cinc.com>
> ---
> drivers/firmware/qcom/qcom_scm.c | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/drivers/firmware/qcom/qcom_scm.c b/drivers/firmware/qcom/qcom_scm.c
> index c82957727650..86e26f17ca19 100644
> --- a/drivers/firmware/qcom/qcom_scm.c
> +++ b/drivers/firmware/qcom/qcom_scm.c
> @@ -583,6 +583,13 @@ int qcom_scm_pas_init_image(u32 peripheral, const void *metadata, size_t size,
> * During the scm call memory protection will be enabled for the meta
> * data blob, so make sure it's physically contiguous, 4K aligned and
> * non-cachable to avoid XPU violations.
> + *
> + * For PIL calls the hypervisor creates SHM Bridges for the blob
> + * buffers on behalf of Linus so we must not do it ourselves hence
Linux
> + * not using the TZMem allocator here.
> + *
> + * If we pass a buffer that is already part of an SHM Bridge to this
> + * call, it will fail.
> */
> mdata_buf = dma_alloc_coherent(__scm->dev, size, &mdata_phys,
> GFP_KERNEL);
>
> --
> 2.43.0
>
Powered by blists - more mailing lists