]> xenbits.xensource.com Git - people/vhanquez/xen-unstable.git/commitdiff
arm: allow ourselves access to all coprocessors in non-secure mode
authorTim Deegan <tim@xen.org>
Fri, 1 Jun 2012 09:20:39 +0000 (10:20 +0100)
committerTim Deegan <tim@xen.org>
Fri, 1 Jun 2012 09:20:39 +0000 (10:20 +0100)
We'll need it to be able to use the VFP extensions, for example.

Signed-off-by: Tim Deegan <tim@xen.org>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
xen/arch/arm/mode_switch.S

index 3a70b9cad45040483637a8e9c1e7e6e2fc08ca89..f5549d76baa23c46765ff45e71915697f4f645f8 100644 (file)
@@ -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 */