From: Stephen Warren <swarren@wwwdotorg.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] u-boot on raspberry 2: booting in SVC secure mode
Date: Fri, 27 Feb 2015 21:58:03 -0700 [thread overview]
Message-ID: <54F14ADB.4000101@wwwdotorg.org> (raw)
In-Reply-To: <CADNVbF-G+cVVa5oQhEsJmv=crS1D2OEFGtPGnUK8FtmDkUMa7w@mail.gmail.com>
On 02/26/2015 02:32 AM, Vincent wrote:
> I tried what Stephen suggested, and just changing CONFIG_SYS_TEXT_BASE
> to 0x0 (with kernel_old=1) does not work: the board display some garbage
> on the uart then hangs. The content of the garbage makes me thinks that
> nothing is done to handle the four cores in this setting which ends up
> badly. I expected this since raspberry's "firmware" only let one core
> run free. I think I need to configure U-boot so that it deals with this
> SMP scenario (I just don't know how).
That expectation seems correct! I hacked in some code right at the start
of U-Boot (reset: in arch/arm/cpu/armv7/start.S) that extracted the
CPUID from the MPIDR register, and only allowed CPU0 to continue. With
that in place, kernel_old=1 and CONFIG_SYS_TEXT_BASE=0 worked.
Interesting that all CPU cores get released at reset; the other SoCs
I've used only release CPU0 and you have to explicitly boot CPUn.
> My goal is to use U-boot to load some small homemade baremetal kernels
> on the raspberry (using serial or tftp loading), in *secure mode*, so I
> need U-boot to stay in secure mode, or at least let me install my own
> secure_monitor code before switching to non-secure mode.
>
> I made a couple attempts of adding secure mode support by adding options
> in configs/rpi_2_defconfig but they don't seem to be taken into account.
> Where do you suggest I put ARMV7_virt and ARMV7_NONSEC ?
I would suggest adding #defines to include/configs/rpi_2.h.
next prev parent reply other threads:[~2015-02-28 4:58 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-25 9:30 [U-Boot] u-boot on raspberry 2: booting in SVC secure mode Vincent
2015-02-25 18:38 ` Stephen Warren
2015-02-26 8:27 ` Vincent
2015-02-26 9:17 ` Andre Przywara
2015-02-26 9:32 ` Vincent
2015-02-26 9:33 ` Vincent
2015-02-27 9:41 ` Andre Przywara
2015-02-27 10:37 ` Vincent
2015-02-28 4:58 ` Stephen Warren [this message]
2015-03-02 10:11 ` Vincent
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=54F14ADB.4000101@wwwdotorg.org \
--to=swarren@wwwdotorg.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox