From: Ian Campbell Date: Sun, 29 Dec 2013 19:07:56 +0000 Subject: [U-Boot] [PATCH] ARM: HYP/non-sec: Propagate stack pointer to hyp mode Message-ID: <1388344076-19268-1-git-send-email-ijc@hellion.org.uk> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Some users of the u-boot API (specifically grub) use the initial SP as a hint regarding where to look for the u-boot API signature. Signed-off-by: Ian Campbell Cc: Marc Zyngier --- This applies on top of Marc's "ARMv7: add PSCI support to u-boot" and allows me to chainload grub on a cubieboard2. (I don't think that has been applied anywhere yet?) --- arch/arm/cpu/armv7/nonsec_virt.S | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/arm/cpu/armv7/nonsec_virt.S b/arch/arm/cpu/armv7/nonsec_virt.S index 6130a37..2c9e097 100644 --- a/arch/arm/cpu/armv7/nonsec_virt.S +++ b/arch/arm/cpu/armv7/nonsec_virt.S @@ -60,6 +60,10 @@ _secure_monitor: #ifdef CONFIG_ARMV7_VIRT orreq r5, r5, #0x100 @ allow HVC instruction moveq r6, #HYP_MODE @ Enter the kernel as HYP + + mrseq r4, sp_svc @ Propagate SP to HYP mode + msreq sp_hyp, r4 @ it serves as a "hint" to + @ find the u-boot API root. #endif mcr p15, 0, r5, c1, c1, 0 @ write SCR (with NS bit set) -- 1.8.4.rc3