Skip to content

Commit c0d0406

Browse files
authored
Merge pull request #3296 from martin-frbg/issue3295
Support Zhaoxin/Centaur family 7 processors as Nehalem
2 parents 40caaef + 8f22ac5 commit c0d0406

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

cpuid_x86.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,6 +283,7 @@ int get_vendor(void){
283283
if (!strcmp(vendor, "CyrixInstead")) return VENDOR_CYRIX;
284284
if (!strcmp(vendor, "NexGenDriven")) return VENDOR_NEXGEN;
285285
if (!strcmp(vendor, "CentaurHauls")) return VENDOR_CENTAUR;
286+
if (!strcmp(vendor, " Shanghai ")) return VENDOR_CENTAUR;
286287
if (!strcmp(vendor, "RiseRiseRise")) return VENDOR_RISE;
287288
if (!strcmp(vendor, " SiS SiS SiS")) return VENDOR_SIS;
288289
if (!strcmp(vendor, "GenuineTMx86")) return VENDOR_TRANSMETA;
@@ -1631,7 +1632,9 @@ int get_cpuname(void){
16311632
case 0x6:
16321633
return CPUTYPE_NANO;
16331634
break;
1634-
1635+
case 0x7:
1636+
return CPUTYPE_NEHALEM;
1637+
break;
16351638
}
16361639
return CPUTYPE_VIAC3;
16371640
}
@@ -2285,6 +2288,9 @@ int get_coretype(void){
22852288
case 0x6:
22862289
return CORE_NANO;
22872290
break;
2291+
case 0x7:
2292+
return CORE_NEHALEM;
2293+
break;
22882294
}
22892295
return CORE_VIAC3;
22902296
}

driver/others/dynamic.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -404,6 +404,7 @@ static int get_vendor(void){
404404
if (!strcmp(vendor.vchar, "GenuineIntel")) return VENDOR_INTEL;
405405
if (!strcmp(vendor.vchar, "AuthenticAMD")) return VENDOR_AMD;
406406
if (!strcmp(vendor.vchar, "CentaurHauls")) return VENDOR_CENTAUR;
407+
if (!strcmp(vendor.vchar, " Shanghai ")) return VENDOR_CENTAUR;
407408
if (!strcmp(vendor.vchar, "HygonGenuine")) return VENDOR_HYGON;
408409

409410
if ((eax == 0) || ((eax & 0x500) != 0)) return VENDOR_INTEL;
@@ -824,6 +825,9 @@ static gotoblas_t *get_coretype(void){
824825
switch (family) {
825826
case 0x6:
826827
return &gotoblas_NANO;
828+
break;
829+
case 0x7:
830+
return &gotoblas_NEHALEM;
827831
}
828832
}
829833

0 commit comments

Comments
 (0)