[v1.02][x86] Detect and print core type in ADL

This commit is contained in:
Dr-Noob
2022-12-02 21:25:30 +00:00
parent d879b06d08
commit b2aa8194c6
3 changed files with 36 additions and 1 deletions

View File

@@ -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

View File

@@ -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);