Getting undefined exception on enabling Neon and VFP

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Getting undefined exception on enabling Neon and VFP

ソリューションへジャンプ
1,260件の閲覧回数
harshitsingh
Contributor I

Hi,

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.

Thanks,

Harshit

ラベル(1)
0 件の賞賛
返信
1 解決策
771件の閲覧回数
Yuri
NXP Employee
NXP Employee

Please use

mcr     p10,#0x7,r0,c8,c0,#0  /* msr     FPEXC,r0 in ARM assembly */

instead of

  VMSR FPEXC,r0

元の投稿で解決策を見る

0 件の賞賛
返信
1 返信
772件の閲覧回数
Yuri
NXP Employee
NXP Employee

Please use

mcr     p10,#0x7,r0,c8,c0,#0  /* msr     FPEXC,r0 in ARM assembly */

instead of

  VMSR FPEXC,r0

0 件の賞賛
返信