Trustzone: DSB before/after SMC

Mark Rutland mark.rutland at arm.com
Tue Oct 27 06:43:19 PDT 2015


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.



More information about the linux-arm-kernel mailing list