From: Tim Deegan Date: Fri, 1 Jun 2012 09:20:39 +0000 (+0100) Subject: arm: allow ourselves access to all coprocessors in non-secure mode X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~8359 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=a5409c42a813535e5db1b38496cacbf7bd80823e;p=xen.git 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 --- 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 */