Browse Source

detect z14 arch on s390x

tags/v0.3.3
Dan Horák 8 years ago
parent
commit
5c6e020f49
1 changed files with 13 additions and 2 deletions
  1. +13
    -2
      cpuid_zarch.c

+ 13
- 2
cpuid_zarch.c View File

@@ -29,15 +29,18 @@

#define CPU_GENERIC 0
#define CPU_Z13 1
#define CPU_Z14 2

static char *cpuname[] = {
"ZARCH_GENERIC",
"Z13"
"Z13",
"Z14"
};

static char *cpuname_lower[] = {
"zarch_generic",
"z13"
"z13",
"z14"
};

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

/* detect z14, but fall back to z13 */
if (strstr(p, "3906")) return CPU_Z13;
if (strstr(p, "3907")) return CPU_Z13;

return CPU_GENERIC;
}

@@ -107,5 +114,9 @@ void get_cpuconfig(void)
printf("#define Z13\n");
printf("#define DTB_DEFAULT_ENTRIES 64\n");
break;
case CPU_Z14:
printf("#define Z14\n");
printf("#define DTB_DEFAULT_ENTRIES 64\n");
break;
}
}

Loading…
Cancel
Save