Re: Why does the kernel run in secure mode ?

Raz <[email protected]> Wed, 20 Jun 2018 11:33:49 +0300
Newsgroups gmane.linux.ports.arm.general
Message-ID <CAPB=Z-qe6QZjJCryjDp0_sfYU_U9U6qkXu89UzZN0726eRXQpQ@mail.gmail.com>
Some resources ?
I modified the boot loader to boot the kernel with SCR.NS=1 and I did
not get any interrupts. So the boot processes stopped.
Any idea what do I do to fix that ?
Does Android kernel run in Normal world ? Should I look in the Android
boot loader ?

Thank you





On Wed, Jun 20, 2018 at 11:13 AM, Nicolas Ferre
<[email protected]> wrote:
> 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