Notes about Memory Type in SDM。
建议读者先看下CPU CacheCPU Cache一致性问题

1. MESI

2. Caching Terminology

3. Methods of Caching Available



3.1 Buffering of Write Combining Memory Locations

3.2 Choosing a Memory Type


4. Cache Control Registers and Bits





5. MTRR(Memory Type Range Register)

6. PAT(Page Attribute Table)


7. Precedence of Cache Controls

考虑如下情况,一个物理页面,被MTRR和PAT同时设置了不同的Memory Type,那么,最终有效的Memory Type(Effective Memory Type)是什么呢?其实就是按照一套优先级规则,推导出Effective Memory Type。规则如下:

7.1 Effective Memory Type

按照优先级规则推导出的结果如下:

8. Corner case

Mark下SDM中的Corner case吧。

8.1 case1

8.2 case2


参考资料:

  1. Getting a handle on caching
  2. Write combining
  3. PAT (Page Attribute Table)
  4. osdev MTRR