u-boot-brain/arch/arm/include/asm/arch-tegra
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
..
ap.h ARM: tegra: support running in non-secure mode 2015-03-04 10:08:57 -07:00
apb_misc.h ARM: tegra: use apb_misc.h in more places 2014-04-17 08:41:05 -07:00
board.h tegra: add proto for pin_mux_mmc 2014-10-25 15:27:37 -04:00
clk_rst.h ARM: tegra: add/edit headers for Tegra124 2014-02-03 09:46:46 -07:00
clock.h ARM: tegra: don't exceed AVP limits when configuring PLLP 2014-02-03 09:46:45 -07:00
funcmux.h Tegra30: Add arch-tegra30 include files 2013-01-16 13:40:07 -07:00
fuse.h Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
gp_padctrl.h ARM: tegra: add/edit headers for Tegra124 2014-02-03 09:46:46 -07:00
gpio.h tegra: Convert tegra GPIO driver to use driver model 2014-09-10 12:59:59 -06:00
mmc.h Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
pinmux.h ARM: tegra: add function to enable input clamping on tristate 2014-05-13 10:41:31 -07:00
pmc.h ARM: tegra: fix pmc_pwrgate_timer_mult register definition 2014-03-05 16:59:08 -07:00
powergate.h ARM: tegra: Implement powergate support 2014-12-18 13:19:20 -07:00
scu.h Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
sys_proto.h Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
tegra_i2c.h dm: i2c: tegra: Convert to driver model 2014-12-11 13:18:44 -07:00
tegra_mmc.h dm: mmc: Remove use of fdtdec GPIO support 2015-01-29 17:09:52 -07:00
tegra.h ARM: tegra: fix NV_PA_CSITE_BASE for Tegra124 2014-03-05 16:59:08 -07:00
timer.h Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
uart.h Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
usb.h usb: tegra: support device mode 2014-05-15 00:21:17 +02:00
warmboot.h Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
xusb-padctl.h ARM: tegra: Implement XUSB pad controller 2014-12-18 13:19:20 -07:00