@@ -46,6 +46,7 @@ size_t length64=sizeof(value64);
4646#define CPU_NEOVERSEN1 11
4747#define CPU_NEOVERSEV1 16
4848#define CPU_NEOVERSEN2 17
49+ #define CPU_NEOVERSEV2 24
4950#define CPU_CORTEXX1 18
5051#define CPU_CORTEXX2 19
5152#define CPU_CORTEXA510 20
@@ -91,7 +92,8 @@ static char *cpuname[] = {
9192 "CORTEXA510" ,
9293 "CORTEXA710" ,
9394 "FT2000" ,
94- "CORTEXA76"
95+ "CORTEXA76" ,
96+ "NEOVERSEV2"
9597};
9698
9799static char * cpuname_lower [] = {
@@ -118,7 +120,8 @@ static char *cpuname_lower[] = {
118120 "cortexa510" ,
119121 "cortexa710" ,
120122 "ft2000" ,
121- "cortexa76"
123+ "cortexa76" ,
124+ "neoversev2"
122125};
123126
124127int get_feature (char * search )
@@ -213,6 +216,8 @@ int detect(void)
213216 return CPU_CORTEXX2 ;
214217 else if (strstr (cpu_part , "0xd4e" )) //X3
215218 return CPU_CORTEXX2 ;
219+ else if (strstr (cpu_part , "0xd4f" )) //NVIDIA Grace et al.
220+ return CPU_NEOVERSEV2 ;
216221 else if (strstr (cpu_part , "0xd0b" ))
217222 return CPU_CORTEXA76 ;
218223 }
@@ -425,6 +430,23 @@ void get_cpuconfig(void)
425430 printf ("#define DTB_DEFAULT_ENTRIES 48\n" );
426431 printf ("#define DTB_SIZE 4096\n" );
427432 break ;
433+ case CPU_NEOVERSEV2 :
434+ printf ("#define ARMV9\n" );
435+ printf ("#define %s\n" , cpuname [d ]);
436+ printf ("#define L1_CODE_SIZE 65536\n" );
437+ printf ("#define L1_CODE_LINESIZE 64\n" );
438+ printf ("#define L1_CODE_ASSOCIATIVE 4\n" );
439+ printf ("#define L1_DATA_SIZE 65536\n" );
440+ printf ("#define L1_DATA_LINESIZE 64\n" );
441+ printf ("#define L1_DATA_ASSOCIATIVE 4\n" );
442+ printf ("#define L2_SIZE 1048576\n" );
443+ printf ("#define L2_LINESIZE 64\n" );
444+ printf ("#define L2_ASSOCIATIVE 8\n" );
445+ // L1 Data TLB = 48 entries
446+ // L2 Data TLB = 2048 entries
447+ printf ("#define DTB_DEFAULT_ENTRIES 48\n" );
448+ printf ("#define DTB_SIZE 4096\n" ); // Set to 4096 for symmetry with other configs.
449+ break ;
428450 case CPU_CORTEXA510 :
429451 case CPU_CORTEXA710 :
430452 case CPU_CORTEXX1 :
0 commit comments