ARM Cortex M7 MPU 可共享性对 M7 性能的影响

ARM Cortex M7 MPU shareablility impact on M7 performance

我是 运行 一个系统测试用例,其中 QSPI、SRAM、DRAM 和设备(外设)存储器 MPU 区域在 ARM_MPU_RASR 中保持可共享。测试用例正在执行 SRAM 到 SRAM 可缓存复制操作。此配置导致 M7 性能低得多 ~70MB/s。 当除设备内存之外的所有设备都禁用可共享性时,性能会显着提高到 ~600 MB/s。 有人可以解释这种行为背后的原因吗? CM7的MPU共享属性和CA53的MMU共享属性有什么区别?

根据 ARM Cortex-M7 Processor Technical Reference Manual (TRM):

By default, only Normal, Non-shareable memory regions can be cached in the RAMs. Caching only takes place if the appropriate cache is enabled and the memory type is cacheable. Shared cacheable memory regions can be cached if CACR.SIWT is set to 1.

所以,在这里,似乎 SRAM 区域被视为不可缓存,这导致吞吐量较低。