Skip to content

Commit 52d3f7a

Browse files
authored
Merge pull request #1738 from sharkcz/s390x
detect z14 arch on s390x
2 parents d4d3113 + 5c6e020 commit 52d3f7a

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

cpuid_zarch.c

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,18 @@
2929

3030
#define CPU_GENERIC 0
3131
#define CPU_Z13 1
32+
#define CPU_Z14 2
3233

3334
static char *cpuname[] = {
3435
"ZARCH_GENERIC",
35-
"Z13"
36+
"Z13",
37+
"Z14"
3638
};
3739

3840
static char *cpuname_lower[] = {
3941
"zarch_generic",
40-
"z13"
42+
"z13",
43+
"z14"
4144
};
4245

4346
int detect(void)
@@ -62,6 +65,10 @@ int detect(void)
6265
if (strstr(p, "2964")) return CPU_Z13;
6366
if (strstr(p, "2965")) return CPU_Z13;
6467

68+
/* detect z14, but fall back to z13 */
69+
if (strstr(p, "3906")) return CPU_Z13;
70+
if (strstr(p, "3907")) return CPU_Z13;
71+
6572
return CPU_GENERIC;
6673
}
6774

@@ -107,5 +114,9 @@ void get_cpuconfig(void)
107114
printf("#define Z13\n");
108115
printf("#define DTB_DEFAULT_ENTRIES 64\n");
109116
break;
117+
case CPU_Z14:
118+
printf("#define Z14\n");
119+
printf("#define DTB_DEFAULT_ENTRIES 64\n");
120+
break;
110121
}
111122
}

0 commit comments

Comments
 (0)