'How to detect P/E-Core in Intel Alder Lake CPU?

Which logical processor belongs to the P-core group and which to E-core group?

My first idea was to just check the base clock for each logical processor and then assume that the lowest base clock belongs to E-core (according to intel specs E-cores always have a noticeable lower base clock than P-core).

I was hoping that checking HKEY_LOCAL_MACHINE\HARDWARE\DESCRIPTION\System\CentralProcessor in the Registry would be enough. Unfortunately ~MHz always contains base clock of P-core.



Solution 1:[1]

The CPUID on Alder Lake is family 6 model 0x9A for both cores when enabled. The CPUID is changed to family 6 model 0x97 when E cores are disabled and AVX512 is enabled.

CPUID leaf 7 EDX bit 15 indicates a hybrid design.

CPUID leaf 1A EAX bit 24-31 indicates the type of core, according to "Game Dev Guide for Alder Lake Performance Hybrid Architecture", https://www.intel.com/content/www/us/en/developer/articles/guide/alder-lake-developer-guide.html

See my discussion at https://www.agner.org/forum/viewtopic.php?f=1&t=79

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 A Fog