From a5409c42a813535e5db1b38496cacbf7bd80823e Mon Sep 17 00:00:00 2001 From: Tim Deegan Date: Fri, 1 Jun 2012 10:20:39 +0100 Subject: [PATCH] arm: allow ourselves access to all coprocessors in non-secure mode We'll need it to be able to use the VFP extensions, for example. Signed-off-by: Tim Deegan Acked-by: Ian Campbell Committed-by: Ian Campbell --- xen/arch/arm/mode_switch.S | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xen/arch/arm/mode_switch.S b/xen/arch/arm/mode_switch.S index 3a70b9cad4..f5549d76ba 100644 --- a/xen/arch/arm/mode_switch.S +++ b/xen/arch/arm/mode_switch.S @@ -65,7 +65,10 @@ enter_hyp_mode: mov r0, #0 mcr CP32(r0, FCSEIDR) mcr CP32(r0, CONTEXTIDR) - /* FIXME: ought to reset some other NS control regs here */ + /* Allow non-secure access to coprocessors, FIQs, VFP and NEON */ + ldr r1, =0x3fff /* 14 CP bits set, all others clear */ + mcr CP32(r1, NSACR) + mrs r0, cpsr /* Copy the CPSR */ add r0, r0, #0x4 /* 0x16 (Monitor) -> 0x1a (Hyp) */ msr spsr_cxsf, r0 /* into the SPSR */ -- 2.30.2