[v0.91][ARM] Print manufacturing process from SoC information

This commit is contained in:
Dr-Noob
2020-11-26 10:51:44 +01:00
parent 20dbc3be27
commit 4c36e4c5e5
6 changed files with 19 additions and 9 deletions

View File

@@ -310,6 +310,7 @@ struct system_on_chip* get_soc() {
struct system_on_chip* soc = malloc(sizeof(struct system_on_chip));
soc->raw_name = NULL;
soc->soc_vendor = SOC_UNKNOWN;
soc->process = UNKNOWN;
soc = guess_soc_from_cpuinfo(soc);
if(soc->soc_vendor == SOC_UNKNOWN) {
@@ -340,3 +341,18 @@ char* get_soc_name(struct system_on_chip* soc) {
return soc->soc_name;
}
char* get_str_process(struct system_on_chip* soc) {
char* str;
if(soc->process == UNKNOWN) {
str = malloc(sizeof(char) * (strlen(STRING_UNKNOWN)+1));
snprintf(str, strlen(STRING_UNKNOWN)+1, STRING_UNKNOWN);
}
else {
str = malloc(sizeof(char) * 5);
memset(str, 0, sizeof(char) * 5);
snprintf(str, 5, "%dnm", soc->process);
}
return str;
}