How to get TLB page size with cpuid

 ̄綄美尐妖づ 提交于 2019-12-11 17:28:50

问题


For Intel I use:

mov, eax, 2h
cpuid

it gives "descriptor decode value" - ok;

For AMD I use:

mov, eax, 80000005h
cpuid

It gives associativity and entries for 4MB in eax (4KB in ebx).

Here it is :

EAX = FF30FF10 EBX = FF30FF20" FF - full assoc. data, 48d entries data, FF - full assoc. instr, 16d entries instr

So I have both 4KB and 4MB or what?

P.S. i`m right that TLB page and L1 cache - different things? Or maybe L1 instr. cache size is what I need?


回答1:


This entry on wikipedia may help you clear up some of the confusion on the different TLB sizes. It's under the heading "Multiple TLB's":

For instance, Intel's Nehalem microarchitecture has a four-way set associative L1 DTLB with 64 entries for 4 KiB pages and 32 entries for 2/4 MiB pages, an L1 ITLB with 128 entries for 4 KiB pages using four-way associativity and 14 fully associative entries for 2/4 MiB pages (both parts of the ITLB divided statically between two threads)1 and a unified 512-entry L2 TLB for 4 KiB pages,[2] both 4-way associative.[3]



来源:https://stackoverflow.com/questions/10699393/how-to-get-tlb-page-size-with-cpuid

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!