[v0.92][ARM] Print ACII art based on SoC instead of CPU vendor. Add snapdragon ASCII art. Refactor printer to save some lines of code

This commit is contained in:
Dr-Noob
2020-11-26 16:42:36 +01:00
parent 89e5e30e53
commit c62a63f539
6 changed files with 109 additions and 94 deletions

View File

@@ -16,7 +16,7 @@ static char* soc_trademark_string[] = {
[SOC_EXYNOS] = "Exynos",
};
bool match_soc(struct system_on_chip* soc, char* raw_name, char* expected_name, char* soc_name, SOC soc_vendor, int32_t process) {
bool match_soc(struct system_on_chip* soc, char* raw_name, char* expected_name, char* soc_name, VENDOR soc_vendor, int32_t process) {
if(strlen(raw_name) > strlen(expected_name))
return false;
@@ -407,6 +407,10 @@ char* get_soc_name(struct system_on_chip* soc) {
return soc->soc_name;
}
VENDOR get_soc_vendor(struct system_on_chip* soc) {
return soc->soc_vendor;
}
char* get_str_process(struct system_on_chip* soc) {
char* str;

View File

@@ -1,10 +1,9 @@
#ifndef __SOC__
#define __SOC__
#include "../common/cpu.h"
#include <stdint.h>
typedef int32_t SOC;
enum {
SOC_UNKNOWN,
SOC_SNAPDRAGON,
@@ -13,7 +12,7 @@ enum {
};
struct system_on_chip {
SOC soc_vendor;
VENDOR soc_vendor;
int32_t process;
char* soc_name;
char* raw_name;
@@ -21,6 +20,7 @@ struct system_on_chip {
struct system_on_chip* get_soc();
char* get_soc_name(struct system_on_chip* soc);
VENDOR get_soc_vendor(struct system_on_chip* soc);
char* get_str_process(struct system_on_chip* soc);
#endif