From mboxrd@z Thu Jan 1 00:00:00 1970 From: Albert ARIBAUD Date: Mon, 9 Jun 2014 21:06:04 +0200 Subject: [U-Boot] [PATCH v4 06/10] ARM: HYP/non-sec: allow relocation to secure RAM In-Reply-To: <1398514631-23956-7-git-send-email-marc.zyngier@arm.com> References: <1398514631-23956-1-git-send-email-marc.zyngier@arm.com> <1398514631-23956-7-git-send-email-marc.zyngier@arm.com> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Marc, On Sat, 26 Apr 2014 13:17:07 +0100, 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 > --- This one causes a minor warning to appear when building aarch64 board vexpress_aemv8a: /home/albert.u.boot/src/u-boot-arm/arch/arm/lib/bootm.c:189:13: warning: 'do_nonsec_virt_switch' defined but not used [-Wunused-function] static void do_nonsec_virt_switch(void) ^ Can you look into removing this warning? Thanks in advance. Amicalement, -- Albert.