From: Sumit Garg <sumit.garg@linaro.org>
To: mark.rutland@arm.com
Cc: Daniel Thompson <daniel.thompson@linaro.org>,
edk2-devel@lists.01.org, Patch Tracking <patches@linaro.org>
Subject: Re: [PATCH edk2-platforms v2 1/1] Silicon/SynQuacer: add optional OP-TEE DT node
Date: Fri, 27 Jul 2018 19:59:42 +0530 [thread overview]
Message-ID: <CAFA6WYN+VThog6J_C6G94W7zKvaPF+FqSsCHOsBbO_e8N0-NWA@mail.gmail.com> (raw)
In-Reply-To: <20180727124911.xcjqzwjvdkcfextm@lakrids.cambridge.arm.com>
On Fri, 27 Jul 2018 at 18:19, Mark Rutland <mark.rutland@arm.com> wrote:
>
> On Thu, Jul 26, 2018 at 02:12:04PM +0530, Sumit Garg wrote:
> > On Thu, 26 Jul 2018 at 13:20, Daniel Thompson <daniel.thompson@linaro.org> wrote:
> > > I guess it could implement a secure monitor call to provide it. In
> > > fact I find it a rather pleasing approach. However I think it still loops
> > > us round to pretty much the same question as before. Does TF-A "protec
> > > " a normal world that makes an SMC to an OP-TEE that isn't there by
> > > failing the call in a nice way?
> >
> > TF-A returns SMC call for OP-TEE as unknown (error code: -1 in "x0"
> > register) if OP-TEE is not present.
>
> Be careful here; you can't use an arbitrary SMC since that could be
> implemented by another trusted OS (with a completely different meaning).
>
> Assuming you know the system provides SMCCC, you can use the "Call UID
> Query" in the trusted OS range, and check that returned value matches
> OP-TEE's UID.
>
> i.e
>
> uid = smccc_uid_query(OPTEE_RANGE);
> if (uid == OPTEEE_SMCCC_UID) {
> [ OP-TEE present ]
> } else {
> [ unknown/no trusted OS present ]
> }
>
Thanks Mark for this useful suggestion. Will try to use it.
-Sumit
> Thanks,
> Mark.
prev parent reply other threads:[~2018-07-27 14:29 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-23 13:19 [PATCH edk2-platforms v2 1/1] Silicon/SynQuacer: add optional OP-TEE DT node Sumit Garg
2018-07-25 10:04 ` Ard Biesheuvel
2018-07-26 7:36 ` Daniel Thompson
2018-07-26 7:39 ` Ard Biesheuvel
2018-07-26 7:50 ` Daniel Thompson
2018-07-26 8:42 ` Sumit Garg
2018-07-27 11:10 ` Daniel Thompson
2018-07-27 11:37 ` Sumit Garg
2018-07-27 12:12 ` Ard Biesheuvel
2018-07-27 12:49 ` Mark Rutland
2018-07-27 14:29 ` Sumit Garg [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAFA6WYN+VThog6J_C6G94W7zKvaPF+FqSsCHOsBbO_e8N0-NWA@mail.gmail.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox