MPU_S and cmse_check_address_range

Hi !

I can see next issue in case if both MPU_S and MPU_NS are active. 

On secure side , I have check for buffer what given by API from nonsecure side :

 

int *p = cmse_check_address_range(data, size, CMSE_NONSECURE | CMSE_MPU_UNPRIV | CMSE_MPU_READWRITE);

 

Looks like area what covered by data+size should be provisioned in Secure MPU by using nonsecure address range, secure address alias is not enough.

Buffer allocated on nonsecure side at address 0x20000000 and Secure MPU cover this area with start address 0x30000000 and cmse check cause memalign secure fault !

It means that Secure MPU should have 2 sections for those 2 SRAM areas if I would like to copy data from secure side to nonsecure. Even physically memory is the same.

Is this OK ?

Regards,

Eugene

More questions in this forum