u-boot-brain/arch/arm
Stephen Warren 73c38934da ARM: tegra: support running in non-secure mode
When the CPU is in non-secure (NS) mode (when running U-Boot under a
secure monitor), certain actions cannot be taken, since they would need
to write to secure-only registers. One example is configuring the ARM
architectural timer's CNTFRQ register.

We could support this in one of two ways:
1) Compile twice, once for secure mode (in which case anything goes) and
   once for non-secure mode (in which case certain actions are disabled).
   This complicates things, since everyone needs to keep track of
   different U-Boot binaries for different situations.
2) Detect NS mode at run-time, and optionally skip any impossible actions.
   This has the advantage of a single U-Boot binary working in all cases.

(2) is not possible on ARM in general, since there's no architectural way
to detect secure-vs-non-secure. However, there is a Tegra-specific way to
detect this.

This patches uses that feature to detect secure vs. NS mode on Tegra, and
uses that to:

* Skip the ARM arch timer initialization.

* Set/clear an environment variable so that boot scripts can take
  different action depending on which mode the CPU is in. This might be
  something like:
  if CPU is secure:
    load secure monitor code into RAM.
    boot secure monitor.
    secure monitor will restart (a new copy of) U-Boot in NS mode.
  else:
    execute normal boot process

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
2015-03-04 10:08:57 -07:00
..
cpu ARM: HYP/non-sec: relocation before enable secondary cores 2015-03-01 16:33:21 +01:00
dts Odroid-XU3: Add eMMC-reset node on DT 2015-02-13 17:17:10 +09:00
imx-common imx: i2c: Zap unnecessary malloc() calls 2014-12-30 14:05:48 +01:00
include ARM: tegra: support running in non-secure mode 2015-03-04 10:08:57 -07:00
lib Merge remote-tracking branch 'u-boot/master' into 'u-boot-arm/master' 2015-02-24 07:59:38 +01:00
mach-at91 ARM: at91: move SoC headers to mach-at91/include/mach 2015-02-21 08:23:52 -05:00
mach-davinci ARM: davinci: move SoC headers to mach-davinci/include/mach 2015-02-21 08:23:52 -05:00
mach-highbank ARM: highbank: move SoC sources to mach-highbank 2015-02-21 08:23:51 -05:00
mach-keystone ARM: keystone: move SoC headers to mach-keystone/include/mach 2015-02-21 08:23:52 -05:00
mach-kirkwood ARM: kirkwood: move SoC headers to mach-kirkwood/include/mach 2015-02-21 08:23:52 -05:00
mach-nomadik ARM: nomadik: move SoC headers to mach-nomadik/include/mach 2015-02-21 08:23:52 -05:00
mach-orion5x edminiv2: switch to SPL 2015-02-25 07:59:50 +01:00
mach-tegra ARM: tegra: support running in non-secure mode 2015-03-04 10:08:57 -07:00
mach-versatile ARM: versatile: move SoC sources to mach-versatile 2015-02-21 08:23:51 -05:00
mvebu-common arm: mvebu: Add Serdes PHY config code 2015-02-06 17:24:59 +01:00
config.mk arm: build arch memset/memcpy in Thumb2 mode 2015-01-09 10:20:22 -05:00
Kconfig rpi: add support for Raspberry Pi 2 model B 2015-02-21 08:28:16 -05:00
Kconfig.debug arm: debug: add Kconfig entries for lowlevel debug 2014-10-26 22:23:12 +01:00
Makefile ARM: prepare for including <mach/*.h> 2015-02-21 08:23:52 -05:00