I am trying to enable a neon and vfp for iMX6 quad Sabre lite board.
Initially when I was setting the target cpu as ‘Cortex-A9.no_neon.no_vfp’, then the code was working fine.
But not when I use the target cpu as ‘Cortex-A9’ only and enabling the VFP and neon using the code mentioned below:
“MRC p15,0,r0,c1,c0,2 ; Read CPACR into r0
ORR r0,r0,#(3<<20) ; OR in User and Privileged access for CP10
ORR r0,r0,#(3<<22) ; OR in User and Privileged access for CP11
BIC r0, r0, #(3<<30) ; Clear ASEDIS/D32DIS if set
MCR p15,0,r0,c1,c0,2 ; Store new access permissions into CPACR
ISB ; Ensure side-effect of CPACR is visible
MOV r0,#(1<<30) ; Create value with FPEXC (bit 30) set in r0
VMSR FPEXC,r0 ; Enable VFP and SIMD extensions”
I get an undefined exception when I do a single stepping for the last instruction ‘VMSR FPEXC, r0’;
So could you please let me know what else need to be taken care of to get rid of this exception with Neon and VFP enabled.
Kindly let me know your feedback regarding this.