make DYNAMIC_ARCH=1 package work on TSV110.

This commit is contained in:
maomao194313 2019-03-12 16:05:19 +08:00 committed by GitHub
parent fb4dae7124
commit f074d7d146
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 24 additions and 2 deletions

View File

@ -39,6 +39,8 @@
// Cavium // Cavium
#define CPU_THUNDERX 7 #define CPU_THUNDERX 7
#define CPU_THUNDERX2T99 8 #define CPU_THUNDERX2T99 8
//Hisilicon
#define CPU_TSV110 9
static char *cpuname[] = { static char *cpuname[] = {
"UNKNOWN", "UNKNOWN",
@ -49,7 +51,8 @@ static char *cpuname[] = {
"CORTEXA73", "CORTEXA73",
"FALKOR", "FALKOR",
"THUNDERX", "THUNDERX",
"THUNDERX2T99" "THUNDERX2T99",
"TSV110"
}; };
static char *cpuname_lower[] = { static char *cpuname_lower[] = {
@ -61,7 +64,8 @@ static char *cpuname_lower[] = {
"cortexa73", "cortexa73",
"falkor", "falkor",
"thunderx", "thunderx",
"thunderx2t99" "thunderx2t99",
"tsv110"
}; };
int get_feature(char *search) int get_feature(char *search)
@ -145,6 +149,9 @@ int detect(void)
return CPU_THUNDERX; return CPU_THUNDERX;
else if (strstr(cpu_implementer, "0x43") && strstr(cpu_part, "0x0af")) else if (strstr(cpu_implementer, "0x43") && strstr(cpu_part, "0x0af"))
return CPU_THUNDERX2T99; return CPU_THUNDERX2T99;
// HiSilicon
else if (strstr(cpu_implementer, "0x48") && strstr(cpu_part, "0xd01"))
return CPU_TSV110;
} }
p = (char *) NULL ; p = (char *) NULL ;
@ -286,6 +293,21 @@ void get_cpuconfig(void)
printf("#define DTB_DEFAULT_ENTRIES 64 \n"); printf("#define DTB_DEFAULT_ENTRIES 64 \n");
printf("#define DTB_SIZE 4096 \n"); printf("#define DTB_SIZE 4096 \n");
break; break;
case CPU_TSV110:
printf("#define TSV110 \n");
printf("#define L1_CODE_SIZE 65536 \n");
printf("#define L1_CODE_LINESIZE 64 \n");
printf("#define L1_CODE_ASSOCIATIVE 4 \n");
printf("#define L1_DATA_SIZE 65536 \n");
printf("#define L1_DATA_LINESIZE 64 \n");
printf("#define L1_DATA_ASSOCIATIVE 4 \n");
printf("#define L2_SIZE 524228 \n");
printf("#define L2_LINESIZE 64 \n");
printf("#define L2_ASSOCIATIVE 8 \n");
printf("#define DTB_DEFAULT_ENTRIES 64 \n");
printf("#define DTB_SIZE 4096 \n");
break;
} }
} }