2018-03-01 15:02 GMT+01:00 Mark Rutland <mark.rutland@xxxxxxx>:
On Thu, Mar 01, 2018 at 02:58:04PM +0100, Benjamin Gaignard wrote:
On early boot stages STM32MP1 platform is able to dedicate some hardware blocks
to a secure OS running in TrustZone.
We need to avoid using those hardware blocks on non-secure context (i.e. kernel)
because read/write accesses could generate illegale access exceptions.
Extended TrustZone Protection driver make sure that device is disabled if
non-secure world can't acces to it.
version 2:
- do not use notifier anymore
- change status property value in device-tree if needed
- use a list of phandle instead of hard coded array
As mentioned on v1, I don't think this should be done in Linux at all.
If you wish to handle this dynamically, please fixup the DT *before*
entering Linux.
If you want a sane default in the dts file, put status = "disabled" on
all nodes which the secure world might take ownership of.
That is the case, nodes are disabled by ealier boot stages before entering
in Linux but, since mistakes and/or errors are always possible, fixup the DT
to avoid illegal access exceptions make sense for me.