mirror of
https://github.com/Dr-Noob/cpufetch.git
synced 2026-03-25 07:50:40 +01:00
[v0.96] Use lower verbosity for some errors found in cpuid
This commit is contained in:
@@ -427,7 +427,7 @@ struct topology* get_topology_info(struct cpuInfo* cpu, struct cache* cach) {
|
|||||||
get_topology_from_apic(cpu, topo);
|
get_topology_from_apic(cpu, topo);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
printErr("Can't read topology information from cpuid (needed level is 0x%.8X, max is 0x%.8X)", 0x00000001, cpu->maxLevels);
|
printWarn("Can't read topology information from cpuid (needed level is 0x%.8X, max is 0x%.8X)", 0x00000001, cpu->maxLevels);
|
||||||
topo->physical_cores = 1;
|
topo->physical_cores = 1;
|
||||||
topo->logical_cores = 1;
|
topo->logical_cores = 1;
|
||||||
topo->smt_available = 1;
|
topo->smt_available = 1;
|
||||||
@@ -451,7 +451,7 @@ struct topology* get_topology_info(struct cpuInfo* cpu, struct cache* cach) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
printErr("Can't read topology information from cpuid (needed extended level is 0x%.8X, max is 0x%.8X)", 0x80000008, cpu->maxExtendedLevels);
|
printWarn("Can't read topology information from cpuid (needed extended level is 0x%.8X, max is 0x%.8X)", 0x80000008, cpu->maxExtendedLevels);
|
||||||
topo->physical_cores = 1;
|
topo->physical_cores = 1;
|
||||||
topo->logical_cores = 1;
|
topo->logical_cores = 1;
|
||||||
topo->smt_supported = 1;
|
topo->smt_supported = 1;
|
||||||
@@ -602,7 +602,7 @@ struct cache* get_cache_info(struct cpuInfo* cpu) {
|
|||||||
if(cpu->cpu_vendor == CPU_VENDOR_INTEL) {
|
if(cpu->cpu_vendor == CPU_VENDOR_INTEL) {
|
||||||
level = 0x00000004;
|
level = 0x00000004;
|
||||||
if(cpu->maxLevels < level) {
|
if(cpu->maxLevels < level) {
|
||||||
printErr("Can't read cache information from cpuid (needed level is 0x%.8X, max is 0x%.8X)", level, cpu->maxLevels);
|
printWarn("Can't read cache information from cpuid (needed level is 0x%.8X, max is 0x%.8X)", level, cpu->maxLevels);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@@ -615,7 +615,7 @@ struct cache* get_cache_info(struct cpuInfo* cpu) {
|
|||||||
printWarn("Can't read cache information from cpuid (needed extended level is 0x%.8X, max is 0x%.8X)", level, cpu->maxExtendedLevels);
|
printWarn("Can't read cache information from cpuid (needed extended level is 0x%.8X, max is 0x%.8X)", level, cpu->maxExtendedLevels);
|
||||||
level = 0x80000006;
|
level = 0x80000006;
|
||||||
if(cpu->maxExtendedLevels < level) {
|
if(cpu->maxExtendedLevels < level) {
|
||||||
printErr("Can't read cache information from cpuid using old method (needed extended level is 0x%.8X, max is 0x%.8X)", level, cpu->maxExtendedLevels);
|
printWarn("Can't read cache information from cpuid using old method (needed extended level is 0x%.8X, max is 0x%.8X)", level, cpu->maxExtendedLevels);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
printWarn("Fallback to old method using 0x%.8X and 0x%.8X", level-1, level);
|
printWarn("Fallback to old method using 0x%.8X and 0x%.8X", level-1, level);
|
||||||
@@ -656,17 +656,8 @@ struct frequency* get_frequency_info(struct cpuInfo* cpu) {
|
|||||||
struct frequency* freq = malloc(sizeof(struct frequency));
|
struct frequency* freq = malloc(sizeof(struct frequency));
|
||||||
|
|
||||||
if(cpu->maxLevels < 0x00000016) {
|
if(cpu->maxLevels < 0x00000016) {
|
||||||
#ifdef _WIN32
|
#if defined (_WIN32) || defined (__APPLE__)
|
||||||
if(cpu->hv->present) {
|
|
||||||
printWarn("Can't read frequency information from cpuid (needed level is 0x%.8X, max is 0x%.8X)", 0x00000016, cpu->maxLevels);
|
printWarn("Can't read frequency information from cpuid (needed level is 0x%.8X, max is 0x%.8X)", 0x00000016, cpu->maxLevels);
|
||||||
}
|
|
||||||
else {
|
|
||||||
printErr("Can't read frequency information from cpuid (needed level is 0x%.8X, max is 0x%.8X)", 0x00000016, cpu->maxLevels);
|
|
||||||
}
|
|
||||||
freq->base = UNKNOWN_FREQ;
|
|
||||||
freq->max = UNKNOWN_FREQ;
|
|
||||||
#elif defined __APPLE__
|
|
||||||
printErr("Can't read frequency information from cpuid (needed level is 0x%.8X, max is 0x%.8X)", 0x00000016, cpu->maxLevels);
|
|
||||||
freq->base = UNKNOWN_FREQ;
|
freq->base = UNKNOWN_FREQ;
|
||||||
freq->max = UNKNOWN_FREQ;
|
freq->max = UNKNOWN_FREQ;
|
||||||
#else
|
#else
|
||||||
|
|||||||
Reference in New Issue
Block a user