PMSA(protected memory system architecture)
不用想这么多,简而言之
PMSA Memory Model就是
从架构的角度看怎么进行memory access,或者
从CPU的角度看怎么进行memory access
1. controlling memory accesses
首先为什么需要memory model?或者说为什么要控制memory access?
因为CPU去访问memory的时候,并不知道memory的实际情况。
举例说明:
CPU如果对0x2000_0000这个地址进行访问,他并不知道访问的这个地址到底是什么东西,可能是DDR,可能是FIFO,可能是控制寄存器等等

不同类型的memory,对memory访问有不同的要求
因此cpu需要对memory access 的behaviour进行控制:
- Ensure accesses happen in a particular order
- Allow accesses to be combined
- Allow read accesses to occur speculatively(投机访问)
- Allow accesses to be cached

如何去做memory access的控制呢?memory map
2. memory map + mpu(memory protection unit)
将不同的memory分配到不同的物理地址空间,然后通过mpu控制memory access
在mpu中对不同的region配置不同的memory attributes,CPU对相应的region发起访问的时候,首先会做mpu的check,如果属性是满足要求的,才会发出访问

memory attributes有哪些呢?
3. memory attributes
- Access permissions
- No Access
- RO
- RW
- Executable
- Can instructions be fetched from this location
- Shareable
- Is the location accessed by more than one processor core
- Memory Types
- SRAM-Like
- Control Registers
- FIFO
本文详细探讨了PMSA内存模型,解释了为何需要控制内存访问以及其背后的原理。通过内存映射和MPU,CPU如何管理不同类型内存的访问权限,包括访问权限设置、可执行性、共享性和内存类型如SRAM、控制寄存器和FIFO等。

3227

被折叠的 条评论
为什么被折叠?



