cancel
Showing results for 
Search instead for 
Did you mean: 

General Discussions

leoyan
Journeyman III

Cannot distinguish the little/big(Zen4/Zen4c) core on Ryzen 5 8500G by cpuid

Hi,

 

I want to distinguish the little/big(Zen4/Zen4c) cores on Ryzen 5 8500G by using cpuid instruction in C++ library.

According to "AMD64 Architecture Programmer’s Manual Volume 3: General-Purpose and System Instructions", "E.4.24 Function 8000_0026—Extended CPU Topology",

I should be able to distinguish it by CPUID Fn8000_0026, however, it didn't work. This is what I got on my machine by using function "0x80000026" on all the cores:

CPUID Fn8000_0026_EAX_n[0]: 0x1         <----------- bits[30] is HeterogeneousCores should be 1 on a hybrid CPU, but now it's 0.
CPUID Fn8000_0026_EBX_n[0]: 0x2
CPUID Fn8000_0026_ECX_n[0]: 0x100     <------------bits[8-15] is LevelType -> 0x1(Core).
CPUID Fn8000_0026_EDX_n[0]: 0x0~0xb       <-------------this value varies on different cores, from 0 ~ 0xb, which is correct

CPUID Fn8000_0026_EAX_n[1]: 0x4
CPUID Fn8000_0026_EBX_n[1]: 0xc
CPUID Fn8000_0026_ECX_n[1]: 0x201
CPUID Fn8000_0026_EDX_n[1]: 0x0~0xb   <-------------this value varies on different cores, from 0 ~ 0xb, which is correct

CPUID Fn8000_0026_EAX_n[2]: 0x4
CPUID Fn8000_0026_EBX_n[2]: 0xc
CPUID Fn8000_0026_ECX_n[2]: 0x302
CPUID Fn8000_0026_EDX_n[2]: 0x0~0xb      <-------------this value varies on different cores, from 0 ~ 0xb, which is correct

CPUID Fn8000_0026_EAX_n[3]: 0x4
CPUID Fn8000_0026_EBX_n[3]: 0xc
CPUID Fn8000_0026_ECX_n[3]: 0x403
CPUID Fn8000_0026_EDX_n[3]: 0x0~0xb      <-------------this value varies on different cores, from 0 ~ 0xb, which is correct

CPUID Fn8000_0026_EAX_n[4]: 0x0
CPUID Fn8000_0026_EBX_n[4]: 0x0
CPUID Fn8000_0026_ECX_n[4]: 0x0           <------- LevelType is zero, stop increasing subfunction number
CPUID Fn8000_0026_EDX_n[4]: 0x0 

BTW, I also tried to distinguish the little/big cores by using Windows' API GetSystemCpuSetInformation and checking the CpuSet.EfficiencyClass, sadly it didn't work neither.

On a Intel's hybrid CPU machine(Arrow Lake) , both cpuid and GetSystemCpuSetInformation works well.

 

Do you have any advice on it?

 

Thanks,

Leo

0 Likes
0 Replies