mirror of
https://github.com/Dr-Noob/cpufetch.git
synced 2026-03-25 16:00:39 +01:00
[v1.06][ARM] Add Windows on Arm support (#273)
This commit is contained in:
@@ -887,7 +887,13 @@ bool print_cpufetch_arm(struct cpuInfo* cpu, STYLE s, struct color** cs, struct
|
||||
char* soc_name = get_soc_name(cpu->soc);
|
||||
char* features = get_str_features(cpu);
|
||||
setAttribute(art, ATTRIBUTE_SOC, soc_name);
|
||||
|
||||
// Currently no reliable way to identify the specific SoC on Windows
|
||||
// https://github.com/Dr-Noob/cpufetch/pull/273
|
||||
// Hide manufacturing process
|
||||
#if !defined(_WIN32)
|
||||
setAttribute(art, ATTRIBUTE_TECHNOLOGY, manufacturing_process);
|
||||
#endif
|
||||
|
||||
if(cpu->num_cpus == 1) {
|
||||
char* uarch = get_str_uarch(cpu);
|
||||
|
||||
@@ -79,6 +79,18 @@ void fill_soc(struct system_on_chip* soc, char* soc_name, SOC soc_model, int32_t
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef _WIN32
|
||||
VENDOR try_match_soc_vendor_name(char* vendor_name)
|
||||
{
|
||||
for(size_t i=1; i < sizeof(soc_trademark_string)/sizeof(soc_trademark_string[0]); i++) {
|
||||
if(strstr(vendor_name, soc_trademark_string[i]) != NULL) {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
return SOC_VENDOR_UNKNOWN;
|
||||
}
|
||||
#endif
|
||||
|
||||
bool match_soc(struct system_on_chip* soc, char* raw_name, char* expected_name, char* soc_name, SOC soc_model, int32_t process) {
|
||||
int len1 = strlen(raw_name);
|
||||
int len2 = strlen(expected_name);
|
||||
|
||||
@@ -51,6 +51,9 @@ VENDOR get_soc_vendor(struct system_on_chip* soc);
|
||||
bool match_soc(struct system_on_chip* soc, char* raw_name, char* expected_name, char* soc_name, SOC soc_model, int32_t process);
|
||||
char* get_str_process(struct system_on_chip* soc);
|
||||
void fill_soc(struct system_on_chip* soc, char* soc_name, SOC soc_model, int32_t process);
|
||||
#ifdef _WIN32
|
||||
VENDOR try_match_soc_vendor_name(char* vendor_name);
|
||||
#endif
|
||||
|
||||
#define SOC_START if (false) {}
|
||||
#define SOC_EQ(raw_name, expected_name, soc_name, soc_model, soc, process) \
|
||||
|
||||
Reference in New Issue
Block a user