mirror of
https://github.com/Dr-Noob/cpufetch.git
synced 2026-03-25 07:50:40 +01:00
[v0.95][x86] Print CPUID 0x1 EAX register with debug flag
This commit is contained in:
@@ -13,7 +13,7 @@
|
|||||||
#include "../arm/midr.h"
|
#include "../arm/midr.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static const char* VERSION = "0.94";
|
static const char* VERSION = "0.95";
|
||||||
|
|
||||||
void print_help(char *argv[]) {
|
void print_help(char *argv[]) {
|
||||||
printf("Usage: %s [--version] [--help] [--debug] [--style \"fancy\"|\"retro\"|\"legacy\"] [--color \"intel\"|\"amd\"|'R,G,B:R,G,B:R,G,B:R,G,B']\n\n", argv[0]);
|
printf("Usage: %s [--version] [--help] [--debug] [--style \"fancy\"|\"retro\"|\"legacy\"] [--color \"intel\"|\"amd\"|'R,G,B:R,G,B:R,G,B:R,G,B']\n\n", argv[0]);
|
||||||
|
|||||||
@@ -891,13 +891,19 @@ char* get_str_fma(struct cpuInfo* cpu) {
|
|||||||
return string;
|
return string;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*** DEBUG ***/
|
|
||||||
|
|
||||||
void print_debug(struct cpuInfo* cpu) {
|
void print_debug(struct cpuInfo* cpu) {
|
||||||
|
uint32_t eax = 0x00000001;
|
||||||
|
uint32_t ebx = 0;
|
||||||
|
uint32_t ecx = 0;
|
||||||
|
uint32_t edx = 0;
|
||||||
|
|
||||||
|
cpuid(&eax, &ebx, &ecx, &edx);
|
||||||
|
|
||||||
printf("%s\n", cpu->cpu_name);
|
printf("%s\n", cpu->cpu_name);
|
||||||
if(cpu->hv->present) printf("- Hypervisor: %s\n", cpu->hv->hv_name);
|
if(cpu->hv->present) printf("- Hypervisor: %s\n", cpu->hv->hv_name);
|
||||||
printf("- Max standard level: 0x%.8X\n", cpu->maxLevels);
|
printf("- Max standard level: 0x%.8X\n", cpu->maxLevels);
|
||||||
printf("- Max extended level: 0x%.8X\n", cpu->maxExtendedLevels);
|
printf("- Max extended level: 0x%.8X\n", cpu->maxExtendedLevels);
|
||||||
|
printf("- CPUID dump: 0x%.8X\n", eax);
|
||||||
|
|
||||||
free_cpuinfo_struct(cpu);
|
free_cpuinfo_struct(cpu);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user