This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Given an address, how to check its IDAU Security attribution information?

From "ARM v8-M Architecture Reference Manual", about IDAU I see:

The IDAU can provide the following Security attribution information for an address:
• Security attribution exempt. This specifies that the address is exempt from security attribution. This information is combined with the address ranges that are architecturally required to be exempt from attribution.
• Non-secure. This specifies if the address is Secure or Non-secure.
• Non-secure callable. This specifies if code at the address can be called from Non-secure state. This attribute is only valid if the address is marked as Secure.
• Region number. This is the region number that matches the address, and is only used by the TT instruction.
• Region number valid. This specifies that the region number is valid. This field has no effect on the attribution of the address, and is only used by the TT instruction.

Given an address, how can I check its IDAU security attribution? Like any register value or API can be checked to see these attribution info? Thanks  

Parents
  • You can disable the SAU and enable the ALLNS bit then use the TT instructions to determine the IDAU security attribution.

    Checkout the TT,TTT,TTA, TTAT instructions in the v8M ARM.

    You'll eventually want to end up at the definition of the SecurityCheck function.

    If you search the web for the TT instruction you'll see that tools have wrapped this Assembler instruction, so it may vary from tool to tool.

    At the end of the day you get back a structure that looks like this:

    typedef union {
    	struct cmse_address_info {
    		unsigned mpu_region:8;
    		unsigned sau_region:8;
    		unsigned mpu_region_valid:1;
    		unsigned sau_region_valid:1;
    		unsigned read_ok:1;
    		unsigned readwrite_ok:1;
    		unsigned nonsecure_read_ok:1;
    		unsigned nonsecure_readwrite_ok:1;
    		unsigned secure:1;
    		unsigned idau_region_valid:1;
    		unsigned idau_region:8;
    	} flags;
    	unsigned value;
    } cmse_address_info_t;

Reply
  • You can disable the SAU and enable the ALLNS bit then use the TT instructions to determine the IDAU security attribution.

    Checkout the TT,TTT,TTA, TTAT instructions in the v8M ARM.

    You'll eventually want to end up at the definition of the SecurityCheck function.

    If you search the web for the TT instruction you'll see that tools have wrapped this Assembler instruction, so it may vary from tool to tool.

    At the end of the day you get back a structure that looks like this:

    typedef union {
    	struct cmse_address_info {
    		unsigned mpu_region:8;
    		unsigned sau_region:8;
    		unsigned mpu_region_valid:1;
    		unsigned sau_region_valid:1;
    		unsigned read_ok:1;
    		unsigned readwrite_ok:1;
    		unsigned nonsecure_read_ok:1;
    		unsigned nonsecure_readwrite_ok:1;
    		unsigned secure:1;
    		unsigned idau_region_valid:1;
    		unsigned idau_region:8;
    	} flags;
    	unsigned value;
    } cmse_address_info_t;

Children