Re: Why does the kernel run in secure mode ?

Nicolas Ferre <[email protected]> Wed, 20 Jun 2018 10:13:59 +0200
Newsgroups gmane.linux.ports.arm.general
Organization microchip
Message-ID <[email protected]>
On 20/06/2018 at 09:59, Raz wrote:
> Hello
> 
> I wanted to examine the use of trust zone in an Atmel board. One of
> things I did was to test the mode in which the kernel runs. I did that
> by reading the SCR register and specifically the NS bit. I expected
> this bit to be 1, but it is 0.
> 
> Why does the kernel runs in SVC secure mode ?

Actually the SoC runs in "single world mode" which is the secure mode by 
default. Doing this, Linux has access to all the resources of the core 
and its peripherals within the SoC.

If you ran in "dual world mode" you would properly configure both the 
"secure mode (aka Secure World: SWd)" and "non-secure mode (aka Normal 
World: NWd)" and then Linux would probably be located in NWd. Then, 
access to some of the resources of the SoC would not be accessible 
anymore to the "rich OS" Linux and collaboration with SWd would need to 
be put in place.

Hope that it helps.

Best regards,
-- 
Nicolas Ferre