u-boot/arch/arm/cpu/armv7
Andre Przywara 1ef923851a ARM: add C function to switch to non-secure state
The core specific part of the work is done in the assembly routine
in nonsec_virt.S, introduced with the previous patch, but for the full
glory we need to setup the GIC distributor interface once for the
whole system, which is done in C here.
The routine is placed in arch/arm/cpu/armv7 to allow easy access from
other ARMv7 boards.

We check the availability of the security extensions first.

Since we need a safe way to access the GIC, we use the PERIPHBASE
registers on Cortex-A15 and A7 CPUs and do some sanity checks.
Boards not implementing the CBAR can override this value via a
configuration file variable.

Then we actually do the GIC enablement:
a) enable the GIC distributor, both for non-secure and secure state
   (GICD_CTLR[1:0] = 11b)
b) allow all interrupts to be handled from non-secure state
   (GICD_IGROUPRn = 0xFFFFFFFF)

The core specific GIC setup is then done in the assembly routine.

Signed-off-by: Andre Przywara <andre.przywara@linaro.org>
2013-10-03 21:28:43 +02:00
..
am33xx am335x:Handle worst case scenario for Errata 1.0.24 2013-09-20 16:57:40 -04:00
at91 arm: atmel: add gmac support for sama5d3xek board 2013-08-22 16:49:54 +02:00
exynos Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
highbank Merge branch 'u-boot/master' into u-boot-arm/master 2013-07-25 17:57:46 +02:00
mx5 usb: ehci-mx5: Use 'bool' instead of 'unsigned char' 2013-08-26 21:56:34 +02:00
mx6 mx6: Fix use of improper value in enable_ipu_clock 2013-09-27 13:53:35 +02:00
omap-common ARM: OMAP5: Avoid writing into LDO SRAM bits 2013-09-20 16:57:40 -04:00
omap3 arm: omap3: fix SRAM copy and execution sequence 2013-08-28 11:44:58 -04:00
omap4 ARM: OMAP4470: Add Elpida EDB8164B3PF memory configuration 2013-08-28 11:44:58 -04:00
omap5 ARM: OMAP5: Avoid writing into LDO SRAM bits 2013-09-20 16:57:40 -04:00
rmobile ARM: refactor compiler options in config.mk 2013-09-23 17:03:05 +02:00
s5p-common Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
s5pc1xx Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
socfpga socfpga: Creating driver for Reset Manager 2013-09-06 12:09:06 +02:00
tegra-common Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
tegra20 config: don't define CONFIG_ARCH_DEVICE_TREE 2013-08-02 18:30:11 -04:00
tegra30 config: don't define CONFIG_ARCH_DEVICE_TREE 2013-08-02 18:30:11 -04:00
tegra114 config: don't define CONFIG_ARCH_DEVICE_TREE 2013-08-02 18:30:11 -04:00
u8500 Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
vf610 Merge branch 'master' of git://git.denx.de/u-boot-i2c 2013-07-24 09:50:24 -04:00
zynq arm: zynq: Fix timer loadaddress 2013-09-23 16:26:32 +02:00
cache_v7.c Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
config.mk ARM: refactor compiler options in config.mk 2013-09-23 17:03:05 +02:00
cpu.c Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
lowlevel_init.S ARM: use r9 for gd 2013-09-23 18:00:02 +02:00
Makefile ARM: add C function to switch to non-secure state 2013-10-03 21:28:43 +02:00
nonsec_virt.S ARM: add assembly routine to switch to non-secure state 2013-10-03 21:28:25 +02:00
start.S Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
syslib.c Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
virt-v7.c ARM: add C function to switch to non-secure state 2013-10-03 21:28:43 +02:00