1
0
Fork 0
remarkable-uboot/arch
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
..
arc arc: introduce U-Boot port for ARCv2 ISA 2015-02-13 09:17:51 +03:00
arm ARM: tegra: support running in non-secure mode 2015-03-04 10:08:57 -07:00
avr32 avr32: add generic board support 2015-02-17 22:54:38 +01:00
blackfin Export redesign 2015-01-29 17:09:57 -07:00
m68k m68k: remove TASREG board 2015-01-13 09:37:21 -05:00
microblaze microblaze: spl: Add LISTS to linker script 2015-02-09 15:13:12 +01:00
mips MIPS: unify CPU code in arch/mips/cpu/ 2015-01-30 14:19:58 +01:00
nds32 common: Move dram_init() declaration to common location 2015-02-09 15:08:48 +01:00
nios2 Kbuild: introduce Makefile in arch/$ARCH/ 2014-12-08 09:35:45 -05:00
openrisc Kbuild: introduce Makefile in arch/$ARCH/ 2014-12-08 09:35:45 -05:00
powerpc common/board_f: factor out reserve_stacks 2015-02-17 22:52:42 +01:00
sandbox Merge branch 'sandbox' of git://git.denx.de/u-boot-x86 2015-02-16 08:37:22 -05:00
sh Replace <compiler.h> with <linux/compiler.h> 2014-12-08 09:35:46 -05:00
sparc Kbuild: introduce Makefile in arch/$ARCH/ 2014-12-08 09:35:45 -05:00
x86 dm: Kconfig: Move CONFIG_SYS_MALLOC_F_LEN to Kconfig 2015-02-12 15:17:28 -07:00
.gitignore .gitignore: drop include/asm/proc from ignore pattern 2014-06-19 11:18:54 -04:00
Kconfig powerpc: Permit device tree control of U-Boot (CONFIG_OF_CONTROL) 2015-02-12 10:35:30 -07:00