u-boot/arch/arm/include/asm
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
..
arch-a320 Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
arch-am33xx am335x:Handle worst case scenario for Errata 1.0.24 2013-09-20 16:57:40 -04:00
arch-arm720t Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
arch-armada100 Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
arch-armv7 Merge branch 'u-boot/master' into u-boot-arm/master 2013-07-25 17:57:46 +02:00
arch-at91 arm: sama5d3: fix smc cs related registers offset 2013-08-22 16:50:58 +02:00
arch-bcm2835 Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
arch-davinci Merge branch 'master' of git://88.191.163.10/u-boot-arm 2013-08-18 14:14:34 -04:00
arch-ep93xx Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
arch-exynos Merge branch 'u-boot-samsung/master' into 'u-boot-arm/master' 2013-09-11 09:59:27 +02:00
arch-imx mxc: Define architecture identifier 2012-09-01 14:58:30 +02:00
arch-ixp Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
arch-kirkwood Merge branch 'master' of git://git.denx.de/u-boot-i2c 2013-07-24 09:50:24 -04:00
arch-ks8695 Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
arch-lpc32xx Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
arch-mb86r0x Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
arch-mx5 usb: ehci-mx5: Use 'bool' instead of 'unsigned char' 2013-08-26 21:56:34 +02:00
arch-mx6 i.MX6DQ/DLS: Add pad MX6_PAD_GPIO_1__USB_OTG_ID 2013-09-27 13:53:35 +02:00
arch-mx25 Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
arch-mx27 mx27: add missing constant for mx27 2013-09-10 19:12:55 +02:00
arch-mx31 Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
arch-mx35 Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
arch-mxs ARM: mxs: Receive r0 and r1 passed from BootROM 2013-09-10 19:12:54 +02:00
arch-nomadik Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
arch-omap3 Merge branch 'u-boot-ti/master' into 'u-boot-arm/master' 2013-09-04 14:06:56 +02:00
arch-omap4 Merge branch 'u-boot-ti/master' into 'u-boot-arm/master' 2013-09-04 14:06:56 +02:00
arch-omap5 Merge branch 'u-boot-ti/master' into 'u-boot-arm/master' 2013-09-04 14:06:56 +02:00
arch-orion5x Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
arch-pantheon Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
arch-pxa Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
arch-rmobile Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
arch-s3c24x0 Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
arch-s5pc1xx arm:mmc:goni/exynos: Fix wrong mmc base register devices offset. 2013-09-11 10:52:10 +09:00
arch-sa1100 Move architecture-specific includes to arch/$ARCH/include/asm 2010-04-13 09:13:12 +02:00
arch-socfpga socfpga: Creating driver for Reset Manager 2013-09-06 12:09:06 +02:00
arch-spear Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
arch-tegra Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
arch-tegra20 Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
arch-tegra30 Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
arch-tegra114 ARM: Tegra: USB: EHCI: Add support for Tegra30/Tegra114 2013-07-11 14:15:15 -07:00
arch-tnetv107x Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
arch-u8500 Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
arch-vf610 Merge branch 'master' of git://git.denx.de/u-boot-i2c 2013-07-24 09:50:24 -04:00
arch-zynq Merge 'u-boot-microblaze/zynq' into (u-boot-arm/master' 2013-09-03 14:01:02 +02:00
imx-common dma: apbh: Add special circular mode for LCD 2013-08-09 21:48:34 +02:00
proc-armv Move architecture-specific includes to arch/$ARCH/include/asm 2010-04-13 09:13:12 +02:00
armv7.h ARM: add C function to switch to non-secure state 2013-10-03 21:28:43 +02:00
assembler.h arm: Use optimized memcpy and memset from linux 2011-04-27 19:38:07 +02:00
atomic.h Move architecture-specific includes to arch/$ARCH/include/asm 2010-04-13 09:13:12 +02:00
bitops.h arm: add __ilog2 function 2011-07-16 13:00:11 +02:00
bootm.h Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
byteorder.h Move architecture-specific includes to arch/$ARCH/include/asm 2010-04-13 09:13:12 +02:00
cache.h Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
config.h Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
dma-mapping.h arm: dma_alloc_coherent: malloc() -> memalign() 2013-09-14 12:08:00 +02:00
ehci-omap.h ARM: OMAP5: USB: Add OMAP5 common USB EHCI information 2013-08-26 21:55:46 +02:00
emif.h ARM: DRA7xx: EMIF: Change settings required for EVM board 2013-06-10 08:43:10 -04:00
errno.h Move architecture-specific includes to arch/$ARCH/include/asm 2010-04-13 09:13:12 +02:00
gic.h ARM: add assembly routine to switch to non-secure state 2013-10-03 21:28:25 +02:00
global_data.h ARM: use r9 for gd 2013-09-23 18:00:02 +02:00
gpio.h gpio: Replace ARM gpio.h with the common API in include/asm-generic 2012-01-09 20:10:32 -06:00
hardware.h Move architecture-specific includes to arch/$ARCH/include/asm 2010-04-13 09:13:12 +02:00
io.h ARM: fix write*() I/O accessors 2011-02-21 08:30:55 +01:00
linkage.h arm: adapt asm/linkage.h from Linux 2012-05-15 08:31:26 +02:00
mach-types.h arm: Remove support for smdk6400 2013-04-12 07:55:08 +02:00
macro.h Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
memory.h Move architecture-specific includes to arch/$ARCH/include/asm 2010-04-13 09:13:12 +02:00
omap_boot.h Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
omap_common.h ARM: OMAP5: Avoid writing into LDO SRAM bits 2013-09-20 16:57:40 -04:00
omap_gpio.h SPDX-License-Identifier: fixing some problematic GPL-2.0 files 2013-08-19 15:34:13 -04:00
omap_gpmc.h Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
omap_mmc.h omap_hsmmc: add driver check for write protection 2013-03-08 16:41:13 -05:00
omap_musb.h Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
pl310.h Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
posix_types.h Move architecture-specific includes to arch/$ARCH/include/asm 2010-04-13 09:13:12 +02:00
processor.h Move architecture-specific includes to arch/$ARCH/include/asm 2010-04-13 09:13:12 +02:00
ptrace.h Move architecture-specific includes to arch/$ARCH/include/asm 2010-04-13 09:13:12 +02:00
sections.h Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
setup.h arm bootm: Allow to pass board specified atags 2012-10-30 15:28:05 -07:00
sizes.h Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
spl.h Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
string.h arm: Use optimized memcpy and memset from linux 2011-04-27 19:38:07 +02:00
system.h ARM: mmu: Set domain permissions to client access 2013-03-28 09:10:58 +01:00
types.h Move architecture-specific includes to arch/$ARCH/include/asm 2010-04-13 09:13:12 +02:00
u-boot-arm.h Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
u-boot.h Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
unaligned.h Move architecture-specific includes to arch/$ARCH/include/asm 2010-04-13 09:13:12 +02:00
utils.h Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00