Skip to content

Commit f074d7d

Browse files
authored
make DYNAMIC_ARCH=1 package work on TSV110.
1 parent fb4dae7 commit f074d7d

File tree

1 file changed

+24
-2
lines changed

1 file changed

+24
-2
lines changed

cpuid_arm64.c

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@
3939
// Cavium
4040
#define CPU_THUNDERX 7
4141
#define CPU_THUNDERX2T99 8
42+
//Hisilicon
43+
#define CPU_TSV110 9
4244

4345
static char *cpuname[] = {
4446
"UNKNOWN",
@@ -49,7 +51,8 @@ static char *cpuname[] = {
4951
"CORTEXA73",
5052
"FALKOR",
5153
"THUNDERX",
52-
"THUNDERX2T99"
54+
"THUNDERX2T99",
55+
"TSV110"
5356
};
5457

5558
static char *cpuname_lower[] = {
@@ -61,7 +64,8 @@ static char *cpuname_lower[] = {
6164
"cortexa73",
6265
"falkor",
6366
"thunderx",
64-
"thunderx2t99"
67+
"thunderx2t99",
68+
"tsv110"
6569
};
6670

6771
int get_feature(char *search)
@@ -145,6 +149,9 @@ int detect(void)
145149
return CPU_THUNDERX;
146150
else if (strstr(cpu_implementer, "0x43") && strstr(cpu_part, "0x0af"))
147151
return CPU_THUNDERX2T99;
152+
// HiSilicon
153+
else if (strstr(cpu_implementer, "0x48") && strstr(cpu_part, "0xd01"))
154+
return CPU_TSV110;
148155
}
149156

150157
p = (char *) NULL ;
@@ -286,6 +293,21 @@ void get_cpuconfig(void)
286293
printf("#define DTB_DEFAULT_ENTRIES 64 \n");
287294
printf("#define DTB_SIZE 4096 \n");
288295
break;
296+
297+
case CPU_TSV110:
298+
printf("#define TSV110 \n");
299+
printf("#define L1_CODE_SIZE 65536 \n");
300+
printf("#define L1_CODE_LINESIZE 64 \n");
301+
printf("#define L1_CODE_ASSOCIATIVE 4 \n");
302+
printf("#define L1_DATA_SIZE 65536 \n");
303+
printf("#define L1_DATA_LINESIZE 64 \n");
304+
printf("#define L1_DATA_ASSOCIATIVE 4 \n");
305+
printf("#define L2_SIZE 524228 \n");
306+
printf("#define L2_LINESIZE 64 \n");
307+
printf("#define L2_ASSOCIATIVE 8 \n");
308+
printf("#define DTB_DEFAULT_ENTRIES 64 \n");
309+
printf("#define DTB_SIZE 4096 \n");
310+
break;
289311
}
290312
}
291313

0 commit comments

Comments
 (0)