简体   繁体   English

STM32H7 的 MPU 子区域安全性

[英]MPU subregions security for STM32H7

I am trying to understand the STM32H7 MPU example , In this example, only one region has been created for all the memory address space 4GB.我试图理解STM32H7 MPU 示例,在此示例中,只为所有 memory 地址空间 4GB 创建了一个区域。
The subregion option is activated which means, it will be divided into 8 subregions starting from 0x0.子区域选项被激活,这意味着它将从 0x0 开始分为 8 个子区域。
And SRD is set to 0x87 which means the MPU will be enabled only on: On-chip peripheral address space, external RAM, Shared device space.并且 SRD 设置为 0x87,这意味着 MPU 将仅在以下情况下启用:片上外设地址空间、外部 RAM、共享设备空间。
This seems strange to me because we kept the most important address space unprotected for Flash, SRAM, System, and Non-shareable devices.这对我来说似乎很奇怪,因为我们为 Flash、SRAM、系统和不可共享设备保留了不受保护的最重要地址空间。
Any explanation of the reason the subregions were configured that way?有任何解释以这种方式配置子区域的原因吗?

When a ThreadX Module thread is scheduled, the MPU is reconfigured such that the module can only access its code and data memory.当 ThreadX 模块线程被调度时,MPU 被重新配置,使得模块只能访问其代码和数据 memory。

One background region is created during initialization.在初始化期间创建一个背景区域。 This region is the only active one for privileged code.该区域是特权代码的唯一活动区域。 Module specific regions are configured every time there is a task switch into user code.每次有任务切换到用户代码时,都会配置模块特定区域。 More information here: https://developer.arm.com/documentation/dui0646/c/Cortex-M7-Peripherals/Optional-Memory-Protection-Unit?lang=en更多信息在这里: https://developer.arm.com/documentation/dui0646/c/Cortex-M7-Peripherals/Optional-Memory-Protection-Unit?lang=en

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM