File tree Expand file tree Collapse file tree 2 files changed +75
-6
lines changed Expand file tree Collapse file tree 2 files changed +75
-6
lines changed Original file line number Diff line number Diff line change @@ -1707,16 +1707,39 @@ int get_cpuname(void){
1707
1707
if (model == 0xf && stepping < 0xe )
1708
1708
return CPUTYPE_NANO ;
1709
1709
return CPUTYPE_NEHALEM ;
1710
+ case 0x7 :
1711
+ switch (exmodel ) {
1712
+ case 5 :
1713
+ if (support_avx2 ())
1714
+ return CPUTYPE_ZEN ;
1715
+ else
1716
+ return CPUTYPE_DUNNINGTON ;
1717
+ default :
1718
+ return CPUTYPE_NEHALEM ;
1719
+ }
1710
1720
default :
1711
- if (family >= 0x7 )
1721
+ if (family >= 0x8 )
1712
1722
return CPUTYPE_NEHALEM ;
1713
1723
else
1714
1724
return CPUTYPE_VIAC3 ;
1715
1725
}
1716
1726
}
1717
1727
1718
1728
if (vendor == VENDOR_ZHAOXIN ){
1719
- return CPUTYPE_NEHALEM ;
1729
+ switch (family ) {
1730
+ case 0x7 :
1731
+ switch (exmodel ) {
1732
+ case 5 :
1733
+ if (support_avx2 ())
1734
+ return CPUTYPE_ZEN ;
1735
+ else
1736
+ return CPUTYPE_DUNNINGTON ;
1737
+ default :
1738
+ return CPUTYPE_NEHALEM ;
1739
+ }
1740
+ default :
1741
+ return CPUTYPE_NEHALEM ;
1742
+ }
1720
1743
}
1721
1744
1722
1745
if (vendor == VENDOR_RISE ){
@@ -2416,16 +2439,39 @@ int get_coretype(void){
2416
2439
if (model == 0xf && stepping < 0xe )
2417
2440
return CORE_NANO ;
2418
2441
return CORE_NEHALEM ;
2442
+ case 0x7 :
2443
+ switch (exmodel ) {
2444
+ case 5 :
2445
+ if (support_avx2 ())
2446
+ return CORE_ZEN ;
2447
+ else
2448
+ return CORE_DUNNINGTON ;
2449
+ default :
2450
+ return CORE_NEHALEM ;
2451
+ }
2419
2452
default :
2420
- if (family >= 0x7 )
2453
+ if (family >= 0x8 )
2421
2454
return CORE_NEHALEM ;
2422
2455
else
2423
2456
return CORE_VIAC3 ;
2424
2457
}
2425
2458
}
2426
2459
2427
2460
if (vendor == VENDOR_ZHAOXIN ) {
2428
- return CORE_NEHALEM ;
2461
+ switch (family ) {
2462
+ case 0x7 :
2463
+ switch (exmodel ) {
2464
+ case 5 :
2465
+ if (support_avx2 ())
2466
+ return CORE_ZEN ;
2467
+ else
2468
+ return CORE_DUNNINGTON ;
2469
+ default :
2470
+ return CORE_NEHALEM ;
2471
+ }
2472
+ default :
2473
+ return CORE_NEHALEM ;
2474
+ }
2429
2475
}
2430
2476
2431
2477
return CORE_UNKNOWN ;
Original file line number Diff line number Diff line change @@ -875,14 +875,37 @@ static gotoblas_t *get_coretype(void){
875
875
if (model == 0xf && stepping < 0xe )
876
876
return & gotoblas_NANO ;
877
877
return & gotoblas_NEHALEM ;
878
+ case 0x7 :
879
+ switch (exmodel ) {
880
+ case 5 :
881
+ if (support_avx2 ())
882
+ return & gotoblas_ZEN ;
883
+ else
884
+ return & gotoblas_DUNNINGTON ;
885
+ default :
886
+ return & gotoblas_NEHALEM ;
887
+ }
878
888
default :
879
- if (family >= 0x7 )
889
+ if (family >= 0x8 )
880
890
return & gotoblas_NEHALEM ;
881
891
}
882
892
}
883
893
884
894
if (vendor == VENDOR_ZHAOXIN ) {
885
- return & gotoblas_NEHALEM ;
895
+ switch (family ) {
896
+ case 0x7 :
897
+ switch (exmodel ) {
898
+ case 5 :
899
+ if (support_avx2 ())
900
+ return & gotoblas_ZEN ;
901
+ else
902
+ return & gotoblas_DUNNINGTON ;
903
+ default :
904
+ return & gotoblas_NEHALEM ;
905
+ }
906
+ default :
907
+ return & gotoblas_NEHALEM ;
908
+ }
886
909
}
887
910
888
911
return NULL ;
You can’t perform that action at this time.
0 commit comments