2.1.3 Instructions for NEON MPE

You can use the NEON MPE in two different states.

Using the NEON MPE in Secure state only

To use the NEON MPE in Secure state only, define the CPACR and FPEXC registers to enable the NEON MPE.

Procedure

  1. Set the CPACR for access to CP10 and CP11 (the NEON MPE coprocessors), and clear the ASEDIS and D32DIS bits:
    LDR r0, =(0xF << 20)
    MCR p15, 0, r0, c1, c0, 2
  2. Set the FPEXC.EN bit to enable the NEON MPE:
    MOV r3, #0x40000000
    VMSR FPEXC, r3

Using the NEON MPE in Secure state and Non-secure state

To use the NEON MPE in Secure state and Non-secure state, first define the NSACR and then define the CPACR and FPEXC registers to enable the NEON MPE.

Procedure

  1. Set bits [11:10] of the NSACR for access to CP10 and CP11 from both Secure and Non-secure states, and clear the NSASEDIS and NSD32DIS bits:
    MRC p15, 0, r0, c1, c1, 2
    ORR r0, r0, #2_11<<10 ; enable neon
    BIC r0, r0, #2_11<<14 ; clear nsasedis/nsd32dis
    MCR p15, 0, r0, c1, c1, 2
  2. Set the CPACR for access to CP10 and CP11, and clear the ASEDIS and D32DIS bits:
    LDR r0, =(0xF << 20)
    MCR p15, 0, r0, c1, c0, 2
  3. Set the FPEXC.EN bit to enable the NEON MPE:
    MOV r3, #0x40000000
    VMSR FPEXC, r3

Note

Operation is UNPREDICTABLE if you configure the CPACR such that CP10 and CP11 do not have identical access permissions.
Non-ConfidentialPDF file icon PDF versionARM 100304_0001_00_en
Copyright © 2009, 2010, 2015 ARM. All rights reserved.