All of lore.kernel.org
 help / color / mirror / Atom feed
From: mark.rutland@arm.com (Mark Rutland)
To: linux-arm-kernel@lists.infradead.org
Subject: Trustzone: DSB before/after SMC
Date: Tue, 27 Oct 2015 13:43:19 +0000	[thread overview]
Message-ID: <20151027134318.GD3091@leverpostej> (raw)
In-Reply-To: <562F7CBA.7060806@free.fr>

On Tue, Oct 27, 2015 at 02:31:38PM +0100, Mason wrote:
> Hello,
> 
> I have a few questions about SMC. (I'm using Cortex-A9)
> 
> Platforms that use SMC often/always execute DSB beforehand.

Please give an example. We don't do this for PSCI, for instance.

> 1a) Is DSB required before SMC?
> 1b) Is DSB required  after SMC?
> 2a) Is DSB required before returning to non-secure OS?
> 2b) Is DSB required  after returning to non-secure OS?

It depends on what you're trying to achieve, and the design of both the
secure and non-secure OS code.

A DSB is certainly not always required before nor after an SMC.

> 3) Is this documented in the ARM ARM?

The semantics of DSB and SMC are documented in the ARM ARM.

How they are used is up to the programmer.

> Bonus question: if DSB is required before SMC, why didn't ARM
> make SMC implicitly do a DSB?

As above, it is not always required.

Thanks,
Mark.

  reply	other threads:[~2015-10-27 13:43 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-27 13:31 Trustzone: DSB before/after SMC Mason
2015-10-27 13:43 ` Mark Rutland [this message]
2015-10-27 14:05   ` Mason
2015-10-27 14:37     ` Mark Rutland
2015-10-27 14:54       ` Måns Rullgård
2015-10-27 15:01       ` Mason

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-all 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=20151027134318.GD3091@leverpostej \
    --to=mark.rutland@arm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.