mirror of
https://github.com/Dr-Noob/cpufetch.git
synced 2026-03-25 16:00:39 +01:00
[v1.02][x86] Detect and print core type in ADL
This commit is contained in:
@@ -35,6 +35,12 @@ enum {
|
||||
HV_VENDOR_INVALID
|
||||
};
|
||||
|
||||
enum {
|
||||
CORE_TYPE_EFFICIENCY,
|
||||
CORE_TYPE_PERFORMANCE,
|
||||
CORE_TYPE_UNKNOWN
|
||||
};
|
||||
|
||||
#define UNKNOWN_DATA -1
|
||||
#define CPU_NAME_MAX_LENGTH 64
|
||||
|
||||
@@ -134,6 +140,8 @@ struct cpuInfo {
|
||||
bool topology_extensions;
|
||||
// Hybrid Flag (Intel only)
|
||||
bool hybrid_flag;
|
||||
// Core Type (P/E)
|
||||
uint32_t core_type;
|
||||
#elif ARCH_PPC
|
||||
uint32_t pvr;
|
||||
#elif ARCH_ARM
|
||||
|
||||
@@ -565,7 +565,10 @@ bool print_cpufetch_x86(struct cpuInfo* cpu, STYLE s, struct color** cs, struct
|
||||
}
|
||||
|
||||
if(hybrid_architecture) {
|
||||
sprintf(cpu_num, "CPU %d:", i+1);
|
||||
if(ptr->core_type == CORE_TYPE_EFFICIENCY) sprintf(cpu_num, "E-cores:");
|
||||
else if(ptr->core_type == CORE_TYPE_PERFORMANCE) sprintf(cpu_num, "P-cores:");
|
||||
else printBug("Found invalid core type!\n");
|
||||
|
||||
setAttribute(art, ATTRIBUTE_CPU_NUM, cpu_num);
|
||||
}
|
||||
setAttribute(art, ATTRIBUTE_FREQUENCY, max_frequency);
|
||||
|
||||
Reference in New Issue
Block a user