mirror of
https://github.com/Dr-Noob/cpufetch.git
synced 2026-03-25 07:50:40 +01:00
[v0.98][ARM] Add M1 SoC detection and apple logo
This commit is contained in:
@@ -18,6 +18,7 @@ static char* soc_trademark_string[] = {
|
||||
[SOC_VENDOR_EXYNOS] = "Exynos ",
|
||||
[SOC_VENDOR_KIRIN] = "Kirin ",
|
||||
[SOC_VENDOR_BROADCOM] = "Broadcom BCM",
|
||||
[SOC_VENDOR_APPLE] = "Apple "
|
||||
};
|
||||
|
||||
static char* soc_rpi_string[] = {
|
||||
@@ -614,7 +615,7 @@ struct system_on_chip* get_soc() {
|
||||
#endif
|
||||
}
|
||||
#elif defined __APPLE__ || __MACH__
|
||||
soc->raw_name = NULL;
|
||||
fill_soc(soc, "M1", SOC_APPLE_M1, 5);
|
||||
#endif
|
||||
|
||||
if(soc->raw_name == NULL) {
|
||||
|
||||
@@ -12,7 +12,8 @@ enum {
|
||||
SOC_VENDOR_MEDIATEK,
|
||||
SOC_VENDOR_EXYNOS,
|
||||
SOC_VENDOR_KIRIN,
|
||||
SOC_VENDOR_BROADCOM
|
||||
SOC_VENDOR_BROADCOM,
|
||||
SOC_VENDOR_APPLE
|
||||
};
|
||||
|
||||
struct system_on_chip {
|
||||
|
||||
@@ -250,6 +250,8 @@ enum {
|
||||
SOC_SNAPD_SM8250,
|
||||
SOC_SNAPD_SM8250_AB,
|
||||
SOC_SNAPD_SM8350,
|
||||
// APPLE
|
||||
SOC_APPLE_M1
|
||||
};
|
||||
|
||||
inline static VENDOR get_soc_vendor_from_soc(SOC soc) {
|
||||
@@ -258,6 +260,7 @@ inline static VENDOR get_soc_vendor_from_soc(SOC soc) {
|
||||
else if(soc >= SOC_EXYNOS_3475 && soc <= SOC_EXYNOS_880) return SOC_VENDOR_EXYNOS;
|
||||
else if(soc >= SOC_MTK_MT6889 && soc <= SOC_MTK_MT8783) return SOC_VENDOR_MEDIATEK;
|
||||
else if(soc >= SOC_SNAPD_QSD8650 && soc <= SOC_SNAPD_SM8350) return SOC_VENDOR_SNAPDRAGON;
|
||||
else if(soc >= SOC_APPLE_M1 && soc <= SOC_APPLE_M1) return SOC_VENDOR_APPLE;
|
||||
return SOC_VENDOR_UNKNOWN;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user