From mboxrd@z Thu Jan 1 00:00:00 1970 From: Albert ARIBAUD Date: Wed, 12 Feb 2014 09:36:37 +0100 Subject: [U-Boot] [PATCH v2 07/13] ARM: HYP/non-sec: allow relocation to secure RAM In-Reply-To: <20131212114731.17591b11@lilith> References: <1386415158-8695-1-git-send-email-marc.zyngier@arm.com> <1386415158-8695-8-git-send-email-marc.zyngier@arm.com> <20131212114731.17591b11@lilith> Message-ID: <20140212093637.76953896@lilith> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Albert, On Thu, 12 Dec 2013 11:47:31 +0100, Albert ARIBAUD wrote: > Hi Marc, > > On Sat, 7 Dec 2013 11:19:12 +0000, Marc Zyngier > wrote: > > > 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 > > --- > > arch/arm/cpu/armv7/nonsec_virt.S | 161 +++++++++++++++++++-------------------- > > arch/arm/cpu/armv7/virt-v7.c | 59 +++++--------- > > arch/arm/include/asm/armv7.h | 10 ++- > > arch/arm/include/asm/secure.h | 26 +++++++ > > arch/arm/lib/bootm.c | 21 ++--- > > 5 files changed, 136 insertions(+), 141 deletions(-) > > create mode 100644 arch/arm/include/asm/secure.h > > It seems like patch 07/13 does not apply properly on top of current ARM. > Can you have a look? If a rebased V3 is needed, you can remove patch 01 > from the list (or if it is simpler to you, keep it in and I'll just > ignore it when applying). I don't think there was a V3 for this so far; correct? > Amicalement, Amicalement, -- Albert.