Add Hygon Dhyana processor support
authorJinke Fan <fanjinke@hygon.cn>
Wed, 15 May 2019 19:54:36 +0800
changeset 13082f77988be3607
parent 13081 53ae8dc25c6e
child 13083 6d31d5218c2c
Add Hygon Dhyana processor support

Background:
Chengdu Haiguang IC Design Co., Ltd (Hygon) is a Joint Venture
between AMD and Haiguang Information Technology Co.,Ltd., aims at
providing high performance x86 processor for China server market.
Its first generation processor codename is Dhyana, which
originates from AMD technology and shares most of the
architecture with AMD's family 17h, but with different CPU Vendor
ID("HygonGenuine")/Family series number(Family 18h).

Related Hygon kernel patch can be found on:
http://lkml.kernel.org/r/5ce86123a7b9dad925ac583d88d2f921040e859b.1538583282.git.puwen@hygon.cn

Best regards.
src/cpuinfo/SDL_cpuinfo.c
     1.1 --- a/src/cpuinfo/SDL_cpuinfo.c	Sun Sep 22 21:41:20 2019 +0300
     1.2 +++ b/src/cpuinfo/SDL_cpuinfo.c	Wed May 15 19:54:36 2019 +0800
     1.3 @@ -602,7 +602,7 @@
     1.4      if (SDL_strcmp(cpuType, "GenuineIntel") == 0) {
     1.5          cpuid(0x00000001, a, b, c, d);
     1.6          return (((b >> 8) & 0xff) * 8);
     1.7 -    } else if (SDL_strcmp(cpuType, "AuthenticAMD") == 0) {
     1.8 +    } else if (SDL_strcmp(cpuType, "AuthenticAMD") == 0 || SDL_strcmp(cpuType, "HygonGenuine") == 0) {
     1.9          cpuid(0x80000005, a, b, c, d);
    1.10          return (c & 0xff);
    1.11      } else {