diff --git a/src/common/ascii.h b/src/common/ascii.h index fe7b692..7c1b17e 100644 --- a/src/common/ascii.h +++ b/src/common/ascii.h @@ -266,6 +266,27 @@ $C1 ## ### ## ##. ## ### ### \ $C1 ## ### ## ##########. ########## ### \ $C1 " +#define ASCII_SIFIVE \ +"$C1 ########################### \ +$C1 ############################### \ +$C1 #### #### \ +$C1 ##### ##### \ +$C1 ##### ##### \ +$C1 #### ######################### \ +$C1 #### ########################### \ +$C1 #### #### \ +$C1 ##### ##### \ +$C1 ##### ##### \ +$C1 ################################# #### \ +$C1 ############################## ##### \ +$C1 ###### ####### ####### \ +$C1 ###### # ###### \ +$C1 ###### ###### \ +$C1 ###### ###### \ +$C1 ###### ###### \ +$C1 ########### \ +$C1 ### " + // --------------------- LONG LOGOS ------------------------- // #define ASCII_AMD_L \ "$C1 \ @@ -369,6 +390,7 @@ asciiL logo_apple = { ASCII_APPLE, 32, 17, false, {C_FG_WHITE}, asciiL logo_allwinner = { ASCII_ALLWINNER, 47, 16, false, {C_FG_CYAN}, {C_FG_B_BLACK, C_FG_B_CYAN } }; asciiL logo_rockchip = { ASCII_ROCKCHIP, 58, 8, false, {C_FG_CYAN, C_FG_YELLOW}, {C_FG_CYAN, C_FG_YELLOW} }; asciiL logo_riscv = { ASCII_RISCV, 63, 18, false, {C_FG_CYAN, C_FG_YELLOW}, {C_FG_CYAN, C_FG_YELLOW} }; +asciiL logo_sifive = { ASCII_SIFIVE, 51, 19, false, {C_FG_WHITE}, {C_FG_WHITE, C_FG_B_CYAN} }; // Long variants | ----------------------------------------------------------------------------------------------------| asciiL logo_amd_l = { ASCII_AMD_L, 62, 19, true, {C_BG_WHITE, C_BG_GREEN}, {C_FG_WHITE, C_FG_GREEN} }; diff --git a/src/common/printer.c b/src/common/printer.c index a5909f2..82b7f66 100644 --- a/src/common/printer.c +++ b/src/common/printer.c @@ -369,7 +369,10 @@ void choose_ascii_art(struct ascii* art, struct color** cs, struct terminal* ter art->art = choose_ascii_art_aux(&logo_arm_l, &logo_arm, term, lf); } #elif ARCH_RISCV - art->art = &logo_riscv; + if(art->vendor == SOC_VENDOR_SIFIVE) + art->art = &logo_sifive; + else + art->art = &logo_riscv; #endif // 2. Choose colors @@ -919,7 +922,7 @@ bool print_cpufetch_arm(struct cpuInfo* cpu, STYLE s, struct color** cs, struct #ifdef ARCH_RISCV bool print_cpufetch_riscv(struct cpuInfo* cpu, STYLE s, struct color** cs, struct terminal* term) { - struct ascii* art = set_ascii(get_cpu_vendor(cpu), s); + struct ascii* art = set_ascii(get_soc_vendor(cpu->soc), s); if(art == NULL) return false; diff --git a/src/riscv/riscv.c b/src/riscv/riscv.c index 987ee1d..ee0ec02 100644 --- a/src/riscv/riscv.c +++ b/src/riscv/riscv.c @@ -38,7 +38,6 @@ struct cpuInfo* get_cpu_info(void) { cpu->hv->present = false; cpu->soc = get_soc(); cpu->freq = get_frequency_info(0); - cpu->cpu_vendor = CPU_VENDOR_RISCV; cpu->peak_performance = get_peak_performance(cpu); return cpu; diff --git a/src/riscv/soc.c b/src/riscv/soc.c index 45d8a43..1e23ef0 100644 --- a/src/riscv/soc.c +++ b/src/riscv/soc.c @@ -5,6 +5,10 @@ #include +VENDOR get_soc_vendor(struct system_on_chip* soc) { + return soc->soc_vendor; +} + char* get_str_process(struct system_on_chip* soc) { char* str; diff --git a/src/riscv/soc.h b/src/riscv/soc.h index f71a35b..368c3b9 100644 --- a/src/riscv/soc.h +++ b/src/riscv/soc.h @@ -21,7 +21,7 @@ struct system_on_chip { struct system_on_chip* get_soc(void); char* get_soc_name(struct system_on_chip* soc); -//VENDOR get_soc_vendor(struct system_on_chip* soc); +VENDOR get_soc_vendor(struct system_on_chip* soc); char* get_str_process(struct system_on_chip* soc); #endif