引流关键词: Non-cacheable,Cacheable, non-shareable,inner-shareable,outer-shareable, optee、ATF、TF-A、Trustzone、optee3.14、MMU、VMSA、cache、TLB、arm、armv8、armv9、TEE、安全、内存管理、页表…
快速链接:
.
个人博客笔记导读目录(全部)
- ARMv8/ARMv9架构精选系列–目录
- ARMV8/ARMV9/Trustzone/TEE安全课程
说明:
在默认情况下,本文讲述的都是ARMV8-aarch64架构,linux kernel 5.14
前提: DynamIQ架构
思考: __clean_dcache_area_pou()的含义是什么?是将L1刷到L2? 还是将L2刷到L3? 还是怎样的
该函数的实现:
(linux/arch/arm64/mm/cache.S)
SYM_FUNC_START(__clean_dcache_area_pou)
alternative_if ARM64_HAS_CACHE_IDC
dsb ishst
ret
alternative_else_nop_endif
dcache_by_line_op cvau, ish, x0, x1, x2, x3
ret
SYM_FUNC_END(__clean_dcache_area_pou)
cvau
其实就是Clean cache by address,范围是到PoU一致性的点,即将L1/L2 cache都clean掉
而对于clean的理解,其实就是给当前范围的cache(本场景中的L1/L2)mared as dirty, 然后该cache的内容会回写到next level of cache 或 main memory。
总结:__clean_dcache_area_pou,就是是clean L1/L2 cache,相当于L1/L2 刷到 L3或main-memory吧