public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH edk2-platforms 1/1] Silicon/SynQuacer/DeviceTree: add OP-TEE driver node
@ 2018-07-20  7:12 Sumit Garg
  2018-07-20 10:01 ` Ard Biesheuvel
  0 siblings, 1 reply; 5+ messages in thread
From: Sumit Garg @ 2018-07-20  7:12 UTC (permalink / raw)
  To: edk2-devel; +Cc: patches, Sumit Garg, Ard Biesheuvel, Leif Lindholm

Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Leif Lindholm <leif.lindholm@linaro.org>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
---
 Silicon/Socionext/SynQuacer/DeviceTree/SynQuacer.dtsi | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/Silicon/Socionext/SynQuacer/DeviceTree/SynQuacer.dtsi b/Silicon/Socionext/SynQuacer/DeviceTree/SynQuacer.dtsi
index 37d642e4b237..d109a5742793 100644
--- a/Silicon/Socionext/SynQuacer/DeviceTree/SynQuacer.dtsi
+++ b/Silicon/Socionext/SynQuacer/DeviceTree/SynQuacer.dtsi
@@ -574,6 +574,13 @@
         #address-cells = <1>;
         #size-cells = <0>;
     };
+
+    firmware {
+        optee {
+            compatible = "linaro,optee-tz";
+            method = "smc";
+        };
+    };
 };
 
 #include "SynQuacerCaches.dtsi"
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH edk2-platforms 1/1] Silicon/SynQuacer/DeviceTree: add OP-TEE driver node
  2018-07-20  7:12 [PATCH edk2-platforms 1/1] Silicon/SynQuacer/DeviceTree: add OP-TEE driver node Sumit Garg
@ 2018-07-20 10:01 ` Ard Biesheuvel
  2018-07-20 10:13   ` Sumit Garg
  0 siblings, 1 reply; 5+ messages in thread
From: Ard Biesheuvel @ 2018-07-20 10:01 UTC (permalink / raw)
  To: Sumit Garg; +Cc: edk2-devel@lists.01.org, Patch Tracking, Leif Lindholm

On 20 July 2018 at 16:12, Sumit Garg <sumit.garg@linaro.org> wrote:
> Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
> Cc: Leif Lindholm <leif.lindholm@linaro.org>
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
> ---
>  Silicon/Socionext/SynQuacer/DeviceTree/SynQuacer.dtsi | 7 +++++++
>  1 file changed, 7 insertions(+)
>
> diff --git a/Silicon/Socionext/SynQuacer/DeviceTree/SynQuacer.dtsi b/Silicon/Socionext/SynQuacer/DeviceTree/SynQuacer.dtsi
> index 37d642e4b237..d109a5742793 100644
> --- a/Silicon/Socionext/SynQuacer/DeviceTree/SynQuacer.dtsi
> +++ b/Silicon/Socionext/SynQuacer/DeviceTree/SynQuacer.dtsi
> @@ -574,6 +574,13 @@
>          #address-cells = <1>;
>          #size-cells = <0>;
>      };
> +
> +    firmware {
> +        optee {
> +            compatible = "linaro,optee-tz";
> +            method = "smc";
> +        };
> +    };
>  };
>
>  #include "SynQuacerCaches.dtsi"

Hello Sumit,

Is it safe to provide this node when optee is not running?

If not, this should be made dependent on that, so we should probably
add status = 'disabled', and remove it in PlatformDxe if the DIP
switch is not set, and/or if there are other ways we might know that
optee is not running.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH edk2-platforms 1/1] Silicon/SynQuacer/DeviceTree: add OP-TEE driver node
  2018-07-20 10:01 ` Ard Biesheuvel
@ 2018-07-20 10:13   ` Sumit Garg
  2018-07-20 10:19     ` Ard Biesheuvel
  0 siblings, 1 reply; 5+ messages in thread
From: Sumit Garg @ 2018-07-20 10:13 UTC (permalink / raw)
  To: Ard Biesheuvel; +Cc: edk2-devel, Patch Tracking, Leif Lindholm

On Fri, 20 Jul 2018 at 15:31, Ard Biesheuvel <ard.biesheuvel@linaro.org> wrote:
>
> On 20 July 2018 at 16:12, Sumit Garg <sumit.garg@linaro.org> wrote:
> > Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
> > Cc: Leif Lindholm <leif.lindholm@linaro.org>
> > Contributed-under: TianoCore Contribution Agreement 1.1
> > Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
> > ---
> >  Silicon/Socionext/SynQuacer/DeviceTree/SynQuacer.dtsi | 7 +++++++
> >  1 file changed, 7 insertions(+)
> >
> > diff --git a/Silicon/Socionext/SynQuacer/DeviceTree/SynQuacer.dtsi b/Silicon/Socionext/SynQuacer/DeviceTree/SynQuacer.dtsi
> > index 37d642e4b237..d109a5742793 100644
> > --- a/Silicon/Socionext/SynQuacer/DeviceTree/SynQuacer.dtsi
> > +++ b/Silicon/Socionext/SynQuacer/DeviceTree/SynQuacer.dtsi
> > @@ -574,6 +574,13 @@
> >          #address-cells = <1>;
> >          #size-cells = <0>;
> >      };
> > +
> > +    firmware {
> > +        optee {
> > +            compatible = "linaro,optee-tz";
> > +            method = "smc";
> > +        };
> > +    };
> >  };
> >
> >  #include "SynQuacerCaches.dtsi"
>
> Hello Sumit,
>
> Is it safe to provide this node when optee is not running?

Yes it is safe. If optee is not running then Linux TEE driver exits
gracefully with below info:

[    1.976021] optee: probing for conduit method from DT.
[    1.976033] optee: api uid mismatch

-Sumit

>
> If not, this should be made dependent on that, so we should probably
> add status = 'disabled', and remove it in PlatformDxe if the DIP
> switch is not set, and/or if there are other ways we might know that
> optee is not running.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH edk2-platforms 1/1] Silicon/SynQuacer/DeviceTree: add OP-TEE driver node
  2018-07-20 10:13   ` Sumit Garg
@ 2018-07-20 10:19     ` Ard Biesheuvel
  2018-07-20 10:27       ` Sumit Garg
  0 siblings, 1 reply; 5+ messages in thread
From: Ard Biesheuvel @ 2018-07-20 10:19 UTC (permalink / raw)
  To: Sumit Garg; +Cc: edk2-devel@lists.01.org, Patch Tracking, Leif Lindholm

On 20 July 2018 at 19:13, Sumit Garg <sumit.garg@linaro.org> wrote:
> On Fri, 20 Jul 2018 at 15:31, Ard Biesheuvel <ard.biesheuvel@linaro.org> wrote:
>>
>> On 20 July 2018 at 16:12, Sumit Garg <sumit.garg@linaro.org> wrote:
>> > Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
>> > Cc: Leif Lindholm <leif.lindholm@linaro.org>
>> > Contributed-under: TianoCore Contribution Agreement 1.1
>> > Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
>> > ---
>> >  Silicon/Socionext/SynQuacer/DeviceTree/SynQuacer.dtsi | 7 +++++++
>> >  1 file changed, 7 insertions(+)
>> >
>> > diff --git a/Silicon/Socionext/SynQuacer/DeviceTree/SynQuacer.dtsi b/Silicon/Socionext/SynQuacer/DeviceTree/SynQuacer.dtsi
>> > index 37d642e4b237..d109a5742793 100644
>> > --- a/Silicon/Socionext/SynQuacer/DeviceTree/SynQuacer.dtsi
>> > +++ b/Silicon/Socionext/SynQuacer/DeviceTree/SynQuacer.dtsi
>> > @@ -574,6 +574,13 @@
>> >          #address-cells = <1>;
>> >          #size-cells = <0>;
>> >      };
>> > +
>> > +    firmware {
>> > +        optee {
>> > +            compatible = "linaro,optee-tz";
>> > +            method = "smc";
>> > +        };
>> > +    };
>> >  };
>> >
>> >  #include "SynQuacerCaches.dtsi"
>>
>> Hello Sumit,
>>
>> Is it safe to provide this node when optee is not running?
>
> Yes it is safe. If optee is not running then Linux TEE driver exits
> gracefully with below info:
>
> [    1.976021] optee: probing for conduit method from DT.
> [    1.976033] optee: api uid mismatch
>

Ok, so it is safe but it still prints a nasty error.

So let's fix this properly: you can check the existing code to find
out how the mmc DT node gets enabled in PlatformDxe.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH edk2-platforms 1/1] Silicon/SynQuacer/DeviceTree: add OP-TEE driver node
  2018-07-20 10:19     ` Ard Biesheuvel
@ 2018-07-20 10:27       ` Sumit Garg
  0 siblings, 0 replies; 5+ messages in thread
From: Sumit Garg @ 2018-07-20 10:27 UTC (permalink / raw)
  To: Ard Biesheuvel; +Cc: edk2-devel, Patch Tracking, Leif Lindholm

On Fri, 20 Jul 2018 at 15:49, Ard Biesheuvel <ard.biesheuvel@linaro.org> wrote:
>
> On 20 July 2018 at 19:13, Sumit Garg <sumit.garg@linaro.org> wrote:
> > On Fri, 20 Jul 2018 at 15:31, Ard Biesheuvel <ard.biesheuvel@linaro.org> wrote:
> >>
> >> On 20 July 2018 at 16:12, Sumit Garg <sumit.garg@linaro.org> wrote:
> >> > Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
> >> > Cc: Leif Lindholm <leif.lindholm@linaro.org>
> >> > Contributed-under: TianoCore Contribution Agreement 1.1
> >> > Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
> >> > ---
> >> >  Silicon/Socionext/SynQuacer/DeviceTree/SynQuacer.dtsi | 7 +++++++
> >> >  1 file changed, 7 insertions(+)
> >> >
> >> > diff --git a/Silicon/Socionext/SynQuacer/DeviceTree/SynQuacer.dtsi b/Silicon/Socionext/SynQuacer/DeviceTree/SynQuacer.dtsi
> >> > index 37d642e4b237..d109a5742793 100644
> >> > --- a/Silicon/Socionext/SynQuacer/DeviceTree/SynQuacer.dtsi
> >> > +++ b/Silicon/Socionext/SynQuacer/DeviceTree/SynQuacer.dtsi
> >> > @@ -574,6 +574,13 @@
> >> >          #address-cells = <1>;
> >> >          #size-cells = <0>;
> >> >      };
> >> > +
> >> > +    firmware {
> >> > +        optee {
> >> > +            compatible = "linaro,optee-tz";
> >> > +            method = "smc";
> >> > +        };
> >> > +    };
> >> >  };
> >> >
> >> >  #include "SynQuacerCaches.dtsi"
> >>
> >> Hello Sumit,
> >>
> >> Is it safe to provide this node when optee is not running?
> >
> > Yes it is safe. If optee is not running then Linux TEE driver exits
> > gracefully with below info:
> >
> > [    1.976021] optee: probing for conduit method from DT.
> > [    1.976033] optee: api uid mismatch
> >
>
> Ok, so it is safe but it still prints a nasty error.
>
> So let's fix this properly: you can check the existing code to find
> out how the mmc DT node gets enabled in PlatformDxe.

Sure will have a look at mmc DT addition code and come up with a more
clean solution.

-Sumit


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2018-07-20 10:27 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-07-20  7:12 [PATCH edk2-platforms 1/1] Silicon/SynQuacer/DeviceTree: add OP-TEE driver node Sumit Garg
2018-07-20 10:01 ` Ard Biesheuvel
2018-07-20 10:13   ` Sumit Garg
2018-07-20 10:19     ` Ard Biesheuvel
2018-07-20 10:27       ` Sumit Garg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox