All of lore.kernel.org
 help / color / mirror / Atom feed
From: Igor Opaniuk <igor.opaniuk@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v1] colibri_imx7: boot kernel in secure mode
Date: Thu, 11 Jul 2019 17:11:21 +0300	[thread overview]
Message-ID: <CAByghJba+4JB6UW9oQ0GBMJUy86RozsUO2a33uQopkhDhTZUSA@mail.gmail.com> (raw)
In-Reply-To: <17581901.uQAkiBOlJB@crypto>

Hi Tobias,

On Wed, Jul 10, 2019 at 3:35 PM Tobias Junghans
<tobias.junghans@veyon.io> wrote:
>
> > > NXP downstream kernel uses legacy method to enable other cores,
> > > which requires kernel to run in a security mode (althought upstream
> > > kernel
> > > uses PSCI for this).
> > >
> > > As we're using NXP kernel in our BSPs, lets enable this by default.
> > >
> > > Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
>
> How does enabling both cores work in upstream kernel? It looks like PSCI does
> not work in secure mode using mainline 4.19 LTS kernel. Any hints? Until this
> is resolved booting in secure mode per default IMHO is not a good option.
>
> Best regards
>
> Tobias
>
>

I'm afraid you're right.
Just after a bit of time researching and discussing with Stefan, seems
that we need to introduce two different wrappers for booting the
mainline kernel and downstream NXP kernel.

* NXP kernel has legacy code to enable all cores, which works only when
running in secure mode.
* Mainline kernel, as you said before, does use PSCI for this, which
is provided by U-boot (which adds proper psci nodes to the linux
dtb on-fly before transferring control to the linux kernel entry point). When we
try to load it in secure mode, it continues running on the same Secure PL1,
and communication using SMC calling convention doesn't make sense at this case.

-- 
Best regards - Freundliche Grüsse - Meilleures salutations

Igor Opaniuk

mailto: igor.opaniuk at gmail.com
skype: igor.opanyuk
+380 (93) 836 40 67
http://ua.linkedin.com/in/iopaniuk

  parent reply	other threads:[~2019-07-11 14:11 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-03 13:50 [U-Boot] [PATCH v1] colibri_imx7: boot kernel in secure mode Igor Opaniuk
2019-07-10 12:19 ` Philippe Schenker
2019-07-10 12:35   ` Tobias Junghans
2019-07-10 13:01     ` Philippe Schenker
2019-07-11 14:11     ` Igor Opaniuk [this message]
2019-07-23 13:29       ` Tobias Junghans
2019-07-24  1:29         ` Peng Fan
2019-07-24 11:29         ` Stefan Agner
2019-07-11 14:44   ` Philippe Schenker
2019-07-24 11:32 ` Stefan Agner
2019-07-24 12:19   ` Igor Opaniuk
2019-08-01 13:19     ` Stefano Babic
2019-08-01 13:23       ` Igor Opaniuk

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=CAByghJba+4JB6UW9oQ0GBMJUy86RozsUO2a33uQopkhDhTZUSA@mail.gmail.com \
    --to=igor.opaniuk@gmail.com \
    --cc=u-boot@lists.denx.de \
    /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.