Browse Source

Merge pull request #1738 from sharkcz/s390x

detect z14 arch on s390x
tags/v0.3.3
Martin Kroeker GitHub 7 years ago
parent
commit
52d3f7af50
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
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