]> git.dujemihanovic.xyz Git - u-boot.git/commit
ARM: HYP/non-sec: allow relocation to secure RAM
authorMarc Zyngier <marc.zyngier@arm.com>
Sat, 12 Jul 2014 13:24:03 +0000 (14:24 +0100)
committerAlbert ARIBAUD <albert.u.boot@aribaud.net>
Mon, 28 Jul 2014 15:19:09 +0000 (17:19 +0200)
commitf510aeae689925a660bff14683eef4147785d271
treec64b78f6ed747616c80e52c7c20e2508fca652f1
parentbf433afd60ce2ccd1bec3cf14150323be8272ac3
ARM: HYP/non-sec: allow relocation to secure RAM

The current non-sec switching code suffers from one major issue:
it cannot run in secure RAM, as a large part of u-boot still needs
to be run while we're switched to non-secure.

This patch reworks the whole HYP/non-secure strategy by:
- making sure the secure code is the *last* thing u-boot executes
  before entering the payload
- performing an exception return from secure mode directly into
  the payload
- allowing the code to be dynamically relocated to secure RAM
  before switching to non-secure.

This involves quite a bit of horrible code, specially as u-boot
relocation is quite primitive.

Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
arch/arm/cpu/armv7/nonsec_virt.S
arch/arm/cpu/armv7/virt-v7.c
arch/arm/include/asm/armv7.h
arch/arm/include/asm/secure.h [new file with mode: 0644]
arch/arm/lib/bootm.c