有关Non-cacheable,,Cacheable, non-shareable,inner-shareable,outer-shareable的理解
關(guān)鍵詞: Non-cacheable,Cacheable, non-shareable,inner-shareable,outer-shareable, optee、ATF、TF-A、Trustzone、optee3.14、MMU、VMSA、cache、TLB、arm、armv8、armv9、TEE、安全、內(nèi)存管理、頁表…
-
如果將block的內(nèi)存屬性配置成Non-cacheable,那么數(shù)據(jù)就不會被緩存到cache,那么所有observer看到的內(nèi)存是一致的,也就說此時(shí)也相當(dāng)于Outer Shareable。
其實(shí)官方文檔,也有這一句的描述:
在B2.7.2章節(jié) “Data accesses to memory locations are coherent for all observers in the system, and correspondingly are treated as being Outer Shareable” -
如果將block的內(nèi)存屬性配置成write-through cacheable 或 write-back cacheable,那么數(shù)據(jù)會被緩存cache中。write-through和write-back是緩存策略。
-
如果將block的內(nèi)存屬性配置成 non-shareable, 那么core0訪問該內(nèi)存時(shí),數(shù)據(jù)緩存的到Core0的L1 d-cache 和 cluster0的L2 cache,不會緩存到其它c(diǎn)ache中
-
如果將block的內(nèi)存屬性配置成 inner-shareable, 那么core0訪問該內(nèi)存時(shí),數(shù)據(jù)只會緩存到core 0和core 1的L1 d-cache中, 也會緩存到clustor0的L2 cache,不會緩存到clustor1中的任何cache里。
-
如果將block的內(nèi)存屬性配置成 outer-shareable, 那么core0訪問該內(nèi)存時(shí),數(shù)據(jù)會緩存到所有cache中
| non-shareable | 數(shù)據(jù)不會緩存到cache (對于觀察則而言,又相當(dāng)于outer-shareable) | Core0讀取時(shí),數(shù)據(jù)緩存的到Core0的L1 d-cache 和 cluster0的L2 cache, 如果core0和core1都讀寫過該內(nèi)存,且在core0 core1的L1 d-cache中都緩存了該內(nèi)存。那么core0在讀取數(shù)據(jù)的時(shí)候,core0的L1 Dcache會更新,但core 1的L1 Dcache不會更新 | 同左側(cè) |
| inner-shareable | 數(shù)據(jù)不會緩存到cache (對于觀察則而言,又相當(dāng)于outer-shareable) | Core0讀取時(shí),數(shù)據(jù)緩存的到Cluster0中所有cache | 同左側(cè) |
| outer-shareable | 數(shù)據(jù)不會緩存到cache (對于觀察則而言,又相當(dāng)于outer-shareable) | Core0讀取時(shí),數(shù)據(jù)緩存的到所有cache | 同左側(cè) |
總結(jié)
以上是生活随笔為你收集整理的有关Non-cacheable,,Cacheable, non-shareable,inner-shareable,outer-shareable的理解的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: OPTEE的内存管理 :页表的创建过程
- 下一篇: [armv9]-ARMV9 CCA 机密