cancel
Showing results for 
Search instead for 
Did you mean: 

Prevent speculative access using PRIVDEFENA

naibaf
Associate

After facing some weird stability issues on the STM32F7 we have setup the MPU according to the recommendations presented in "MPU usage in STM32 with ARM CortexM7":

https://www.st.com/content/st_com/en/support/learning/stm32-education/stm32-moocs/STM32_MPU_tips.html 

As far as I understand, the key point is to prevent speculative execution fetch from ExternalRAM and ExternalDevice memory regions. This is done by setup a 4GB wide low priority region and then enabling only some sub-regions (0x87) to have a range from 0x6000 0000 to 0xDFFF FFFF:

naibaf_0-1704712713418.png

Since MPU_PRIVILEDGED_DEFAULT is enabled in this example, for all disabled subsections of the MPU_REGION_NUMBER0 the default memorymap will be active (privileged access only).

 

My question is: Could the speculative access also be prevented by disabling the privileged default memory map (PRIVDEFENA = 0). This would disallow all access (R/W) to the whole memory range at first. Memory areas used by the application would then have to be added defining separate MPU regions.

 

 

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Billy OWEN
ST Employee

Hi @naibaf 

 

The forum moderator had marked your post as needing a little more investigation and direct support. An online support case has been created on your behalf, please stand by for just a moment and you will hear from us.

 

Regards,

Billy

View solution in original post

1 REPLY 1
Billy OWEN
ST Employee

Hi @naibaf 

 

The forum moderator had marked your post as needing a little more investigation and direct support. An online support case has been created on your behalf, please stand by for just a moment and you will hear from us.

 

Regards,

Billy