|
|
|
@@ -82,6 +82,7 @@ size_t length64=sizeof(value64); |
|
|
|
#define CPU_AMPERE1 25 |
|
|
|
// Apple |
|
|
|
#define CPU_VORTEX 13 |
|
|
|
#define CPU_VORTEXM4 26 |
|
|
|
// Fujitsu |
|
|
|
#define CPU_A64FX 15 |
|
|
|
// Phytium |
|
|
|
@@ -113,7 +114,8 @@ static char *cpuname[] = { |
|
|
|
"FT2000", |
|
|
|
"CORTEXA76", |
|
|
|
"NEOVERSEV2", |
|
|
|
"AMPERE1" |
|
|
|
"AMPERE1", |
|
|
|
"VORTEXM4", |
|
|
|
}; |
|
|
|
|
|
|
|
static char *cpuname_lower[] = { |
|
|
|
@@ -143,7 +145,7 @@ static char *cpuname_lower[] = { |
|
|
|
"cortexa76", |
|
|
|
"neoversev2", |
|
|
|
"ampere1", |
|
|
|
"ampere1a" |
|
|
|
"vortexm4" |
|
|
|
}; |
|
|
|
|
|
|
|
static int cpulowperf=0; |
|
|
|
@@ -400,7 +402,7 @@ int detect(void) |
|
|
|
if (value64 ==131287967|| value64 == 458787763 ) return CPU_VORTEX; //A12/M1 |
|
|
|
if (value64 == 3660830781) return CPU_VORTEX; //A15/M2 |
|
|
|
if (value64 == 2271604202) return CPU_VORTEX; //A16/M3 |
|
|
|
if (value64 == 1867590060) return CPU_VORTEX; //M4 |
|
|
|
if (value64 == 1867590060) return CPU_VORTEXM4; //M4 |
|
|
|
#else |
|
|
|
#ifdef OS_WINDOWS |
|
|
|
HKEY reghandle; |
|
|
|
@@ -740,6 +742,27 @@ void get_cpuconfig(void) |
|
|
|
length64 = sizeof(value64); |
|
|
|
sysctlbyname("hw.l2cachesize",&value64,&length64,NULL,0); |
|
|
|
printf("#define L2_SIZE %lld \n",value64); |
|
|
|
#endif |
|
|
|
printf("#define DTB_DEFAULT_ENTRIES 64 \n"); |
|
|
|
printf("#define DTB_SIZE 4096 \n"); |
|
|
|
break; |
|
|
|
case CPU_VORTEXM4: |
|
|
|
printf("#define VORTEXM4 \n"); |
|
|
|
printf("#define HAVE_SME 1 \n"); |
|
|
|
#ifdef __APPLE__ |
|
|
|
length64 = sizeof(value64); |
|
|
|
sysctlbyname("hw.l1icachesize",&value64,&length64,NULL,0); |
|
|
|
printf("#define L1_CODE_SIZE %lld \n",value64); |
|
|
|
length64 = sizeof(value64); |
|
|
|
sysctlbyname("hw.cachelinesize",&value64,&length64,NULL,0); |
|
|
|
printf("#define L1_CODE_LINESIZE %lld \n",value64); |
|
|
|
printf("#define L1_DATA_LINESIZE %lld \n",value64); |
|
|
|
length64 = sizeof(value64); |
|
|
|
sysctlbyname("hw.l1dcachesize",&value64,&length64,NULL,0); |
|
|
|
printf("#define L1_DATA_SIZE %lld \n",value64); |
|
|
|
length64 = sizeof(value64); |
|
|
|
sysctlbyname("hw.l2cachesize",&value64,&length64,NULL,0); |
|
|
|
printf("#define L2_SIZE %lld \n",value64); |
|
|
|
#endif |
|
|
|
printf("#define DTB_DEFAULT_ENTRIES 64 \n"); |
|
|
|
printf("#define DTB_SIZE 4096 \n"); |
|
|
|
|