日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當(dāng)前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

[mmu/cache]-ARMV8的cache的维护指令介绍

發(fā)布時間:2025/3/21 编程问答 40 豆豆
生活随笔 收集整理的這篇文章主要介紹了 [mmu/cache]-ARMV8的cache的维护指令介绍 小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.

★★★ 個人博客導(dǎo)讀首頁—點擊此處 ★★★

Armv8里定義的Cache的管理的操作有三種:

  • 無效(Invalidate) 整個高速緩存或者某個高速緩存行。高速緩存上的數(shù)據(jù)會被丟棄。
  • 清除(Clean) 整個高速緩存或者某個高速緩存行。相應(yīng)的高速緩存行會被標(biāo)記為臟,數(shù)據(jù)會寫回到下一級高速緩存中或者主存儲器中。
  • 清零(Zero) 在某些情況下,對高速緩存進行清零操作起到一個預(yù)取和加速的功效,比如當(dāng)程序需要使用一大塊臨時內(nèi)存,在初始化階段對這個內(nèi)存進行清零操作,這時高速緩存控制器會主動把這些零數(shù)據(jù)寫入高速緩存行中。若程序主動使用高速緩存的清零操作,那么將大大減少系統(tǒng)內(nèi)部總線的帶寬。

對高速緩存的操作可以指定不同的范圍。

  • 整塊高速緩存。
  • 某個虛擬地址。
  • 特定的高速緩存行或者組和路。

另外在ARMv8架構(gòu)中最多可以支持7級的高速緩存,L1~L7高速緩存。當(dāng)對一個高速緩存行進行操作時,我們需要知道高速緩存操作的范圍。ARMv8架構(gòu)中從處理器到所有內(nèi)存的角度分成如下幾個視角。

  • PoC(Point of Coherency,全局緩存一致性角度)
  • PoU(Point of Unification,處理器緩存一致性角度

有了上面的這些概念,然后我們再看下cache的指令格式:

function中的G和D一般和其它function組合使用的,例如
DC IGDVAC :操作d-cache,根據(jù)虛擬地址無效掉data和Allocation Tags,操作范圍到PoC

Invalidate data and Allocation Tags in data cache by address to Point of Coherency.

DC IGVAC :操作d-cache,根據(jù)虛擬地址無效掉Allocation Tags,操作范圍到PoC

Invalidate Allocation Tags in data cache by address to Point of Coherency

最后,我們再看armv8文檔中定義的cache指令集:

DC CISW, Data or unified Cache line Clean and Invalidate by Set/Way DC CSW, Data or unified Cache line Clean by Set/Way DC CVAU, Data or unified Cache line Clean by VA to PoU DC ZVA, Data Cache Zero by VAIC IALLU, Instruction Cache Invalidate All to PoU IC IALLU{, <Xt>} IC IALLUIS, Instruction Cache Invalidate All to PoU, Inner Shareable IC IALLUIS{, <Xt>} IC IVAU, Instruction Cache line Invalidate by VA to PoU IC IVAU{, <Xt>}DC CIVAC, Data or unified Cache line Clean and Invalidate by VA to PoC DC CVAC, Data or unified Cache line Clean by VA to PoC DC CVAP, Data or unified Cache line Clean by VA to PoP DC GVA, Data Cache set Allocation Tag by VA DC GZVA, Data Cache set Allocation Tags and Zero by VA DC IGDSW, Data, Allocation Tag or unified Cache line Invalidate of Data and Allocation Tags by Set/Way DC IGDVAC, Data, Allocation Tag or unified Cache line Invalidate of Allocation Tags by VA to PoC DC IGSW, Data, Allocation Tag or unified Cache line Invalidate of Allocation Tags by Set/Way DC IGVAC, Data, Allocation Tag or unified Cache line Invalidate of Allocation Tags by VA to PoC DC ISW, Data or unified Cache line Invalidate by Set/Way DC IVAC, Data or unified Cache line Invalidate by VA to PoC DC CVADP, Data or unified Cache line Clean by VA to PoDPARMv8.5-MemTag: DC CGDSW, Data, Allocation Tag or unified Cache line Clean of Data and Allocation Tags by Set/Way DC CGDVAC, Data, Allocation Tag or unified Cache line Clean of Allocation Tags by VA to PoC DC CGDVADP, Data, Allocation Tag or unified Cache line Clean of Allocation Tags by VA to PoDP DC CGDVAP, Data, Allocation Tag or unified Cache line Clean of Data and Allocation Tags by VA to PoP DC CGSW, Data, Allocation Tag or unified Cache line Clean of Allocation Tags by Set/Way DC CGVAC, Data, Allocation Tag or unified Cache line Clean of Allocation Tags by VA to PoC DC CGVADP, Data, Allocation Tag or unified Cache line Clean of Data and Allocation Tags by VA to PoDP DC CGVAP, Data, Allocation Tag or unified Cache line Clean of Allocation Tags by VA to PoP DC CIGDSW, Data, Allocation Tag or unified Cache line Clean and Invalidate of Data and Allocation Tags by Set/Way DC CIGDVAC, Data, Allocation Tag or unified Cache line Clean and Invalidate of Data and Allocation Tags by VA to PoC DC CIGSW, Data, Allocation Tag or unified Cache line Clean and Invalidate of Allocation Tags by Set/Way DC CIGVAC, Data, Allocation Tag or unified Cache line Clean and Invalidate of Allocation Tags by VA to PoC

cache操作的使用示例:

總結(jié)

以上是生活随笔為你收集整理的[mmu/cache]-ARMV8的cache的维护指令介绍的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯,歡迎將生活随笔推薦給好友。