發表文章

目前顯示的是 1月, 2023的文章

設定CPU的Cache模式:MTRR

圖片
  MSR(Model-Specific Register)內記錄關於CPU的特性,在MSR有段被稱為MTRR(Memory-Type Range Registers),用來記錄快取記憶體的模式。 快取模式 有5種快取模式。 編碼 簡寫 名稱 00h UC Uncacheable 01h WC Write-Combining 02h Reserved 03h Reserved 04h WT Writethrough 05h WP Write-Protect 06h WB Writeback IA32_MTRRCAP IA32_MTRRCAP的位址在MSR[FEh],定義如下: 位元 標記 描述 63 ~ 11 Reserved 10 WC Write-combining type is available 9 Reserved 8 FIX All fixed-size MTRRs are available 7 ~ 0 VCNT Count of variable-size MTRRs supported IA32_MTRRdefType IA32_MTRRdefType的位址在MSR[2FFh],定義如下: 位...