diff mbox series

[RFC,3/4] dt-bindings: remoteproc: add compatibility for TEE support

Message ID 20230523091350.292221-4-arnaud.pouliquen@foss.st.com (mailing list archive)
State Changes Requested
Headers show
Series introduction of a remoteproc tee to load signed firmware images | expand

Commit Message

Arnaud POULIQUEN May 23, 2023, 9:13 a.m. UTC
Rework compatibility description according to the support of
the authenticated firmware relying on OP-TEE authentication.

The expected behavior is:
- with legacy compatible "st,stm32mp1-m4" the Linux kernel loads a
  non-signed (ELF) firmware image,
- with compatible "st,stm32mp1-m4-tee" the Linux kernel load a signed
  firmware image. In this case it calls TEE services to manage the firmware
  loading and the remoteproc life-cycle.

Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@foss.st.com>
---
 .../bindings/remoteproc/st,stm32-rproc.yaml   | 33 +++++++++++++++++--
 1 file changed, 30 insertions(+), 3 deletions(-)

Comments

Krzysztof Kozlowski May 30, 2023, 11:50 a.m. UTC | #1
On 23/05/2023 11:13, Arnaud Pouliquen wrote:
> Rework compatibility description according to the support of
> the authenticated firmware relying on OP-TEE authentication.
> 
> The expected behavior is:
> - with legacy compatible "st,stm32mp1-m4" the Linux kernel loads a
>   non-signed (ELF) firmware image,
> - with compatible "st,stm32mp1-m4-tee" the Linux kernel load a signed
>   firmware image. In this case it calls TEE services to manage the firmware
>   loading and the remoteproc life-cycle.
> 
> Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@foss.st.com>
> ---
>  .../bindings/remoteproc/st,stm32-rproc.yaml   | 33 +++++++++++++++++--
>  1 file changed, 30 insertions(+), 3 deletions(-)

Please use scripts/get_maintainers.pl to get a list of necessary people
and lists to CC.  It might happen, that command when run on an older
kernel, gives you outdated entries.  Therefore please be sure you base
your patches on recent Linux kernel.

You missed at least DT list (maybe more), so this won't be tested.
Please resend and include all necessary entries.

Because of above and RFC, I assume there is no need for review. Just to
be clear - that's a no.

Best regards,
Krzysztof
Arnaud POULIQUEN May 30, 2023, 3 p.m. UTC | #2
Hello Krzysztof,

On 5/30/23 13:50, Krzysztof Kozlowski wrote:
> On 23/05/2023 11:13, Arnaud Pouliquen wrote:
>> Rework compatibility description according to the support of
>> the authenticated firmware relying on OP-TEE authentication.
>>
>> The expected behavior is:
>> - with legacy compatible "st,stm32mp1-m4" the Linux kernel loads a
>>   non-signed (ELF) firmware image,
>> - with compatible "st,stm32mp1-m4-tee" the Linux kernel load a signed
>>   firmware image. In this case it calls TEE services to manage the firmware
>>   loading and the remoteproc life-cycle.
>>
>> Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@foss.st.com>
>> ---
>>  .../bindings/remoteproc/st,stm32-rproc.yaml   | 33 +++++++++++++++++--
>>  1 file changed, 30 insertions(+), 3 deletions(-)
> 
> Please use scripts/get_maintainers.pl to get a list of necessary people
> and lists to CC.  It might happen, that command when run on an older
> kernel, gives you outdated entries.  Therefore please be sure you base
> your patches on recent Linux kernel.
> 
> You missed at least DT list (maybe more), so this won't be tested.
> Please resend and include all necessary entries.
> 
> Because of above and RFC, I assume there is no need for review. Just to
> be clear - that's a no.

I did not add DT list and maintainers intentionally to avoid that you
review it.
As in a first step the associated OP-TEE pull request has to be reviewed.
And my plan was just to share the Linux implementation part until the
OP-TEE review cycle is finished.

Now regarding your mail (and very interesting feedback from Christoph Hellwig),
it was clearly not the good strategy.
So my apologize and next time whatever the objective of the series I will add
all peoples and lists in the loop.

Thanks,
Arnaud

> 
> Best regards,
> Krzysztof
>
Krzysztof Kozlowski May 30, 2023, 3:12 p.m. UTC | #3
On 30/05/2023 17:00, Arnaud POULIQUEN wrote:
> Hello Krzysztof,
> 
> On 5/30/23 13:50, Krzysztof Kozlowski wrote:
>> On 23/05/2023 11:13, Arnaud Pouliquen wrote:
>>> Rework compatibility description according to the support of
>>> the authenticated firmware relying on OP-TEE authentication.
>>>
>>> The expected behavior is:
>>> - with legacy compatible "st,stm32mp1-m4" the Linux kernel loads a
>>>   non-signed (ELF) firmware image,
>>> - with compatible "st,stm32mp1-m4-tee" the Linux kernel load a signed
>>>   firmware image. In this case it calls TEE services to manage the firmware
>>>   loading and the remoteproc life-cycle.
>>>
>>> Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@foss.st.com>
>>> ---
>>>  .../bindings/remoteproc/st,stm32-rproc.yaml   | 33 +++++++++++++++++--
>>>  1 file changed, 30 insertions(+), 3 deletions(-)
>>
>> Please use scripts/get_maintainers.pl to get a list of necessary people
>> and lists to CC.  It might happen, that command when run on an older
>> kernel, gives you outdated entries.  Therefore please be sure you base
>> your patches on recent Linux kernel.
>>
>> You missed at least DT list (maybe more), so this won't be tested.
>> Please resend and include all necessary entries.
>>
>> Because of above and RFC, I assume there is no need for review. Just to
>> be clear - that's a no.
> 
> I did not add DT list and maintainers intentionally to avoid that you
> review it.
> As in a first step the associated OP-TEE pull request has to be reviewed.
> And my plan was just to share the Linux implementation part until the
> OP-TEE review cycle is finished.

Sure, that's fine. I just don't know whether this is intentional or not.
Many people skip list without such reason...

> 
> Now regarding your mail (and very interesting feedback from Christoph Hellwig),
> it was clearly not the good strategy.
> So my apologize and next time whatever the objective of the series I will add
> all peoples and lists in the loop.

No worries! Thanks.

Best regards,
Krzysztof
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/remoteproc/st,stm32-rproc.yaml b/Documentation/devicetree/bindings/remoteproc/st,stm32-rproc.yaml
index 959a56f1b6c7..1671a90d5974 100644
--- a/Documentation/devicetree/bindings/remoteproc/st,stm32-rproc.yaml
+++ b/Documentation/devicetree/bindings/remoteproc/st,stm32-rproc.yaml
@@ -16,7 +16,12 @@  maintainers:
 
 properties:
   compatible:
-    const: st,stm32mp1-m4
+    enum:
+      - st,stm32mp1-m4
+      - st,stm32mp1-m4-tee
+    description:
+      Use "st,stm32mp1-m4" for the Cortex-M4 coprocessor management by Linux
+      Use "st,stm32mp1-m4-tee" for the Cortex-M4 coprocessor management by OPTEE
 
   reg:
     description:
@@ -135,8 +140,28 @@  required:
   - compatible
   - reg
   - resets
-  - st,syscfg-holdboot
-  - st,syscfg-tz
+
+allOf:
+  - if:
+      properties:
+        compatible:
+          enum:
+            - st,stm32mp1-m4
+    then:
+      required:
+        - memory-region
+        - st,syscfg-holdboot
+        - st,syscfg-tz
+        - resets
+  - if:
+      properties:
+        compatible:
+          enum:
+            - st,stm32mp1-m4-tee
+    then:
+      required:
+        - memory-region
+
 
 additionalProperties: false
 
@@ -148,6 +173,8 @@  examples:
       reg = <0x10000000 0x40000>,
             <0x30000000 0x40000>,
             <0x38000000 0x10000>;
+      memory-region = <&retram>, <&mcuram>, <&mcuram2>, <&vdev0vring0>,
+                      <&m_ipc_shm>, <&vdev0vring1>, <&vdev0buffer>;
       resets = <&rcc MCU_R>;
       st,syscfg-holdboot = <&rcc 0x10C 0x1>;
       st,syscfg-tz = <&rcc 0x000 0x1>;