[hatari-devel] [PATCH] Add support for Hygon Dhyana processor |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/hatari-devel Archives
]
I tried to add support for Hygon Dhyana processor.
Could anyone please help me submit it?
Thank you so much!
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).
More details can be found on:
http://lkml.kernel.org/r/5ce86123a7b9dad925ac583d88d2f921040e859b.1538583282.git.puwen@xxxxxxxx
---
src/cpu/jit/codegen_x86.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/cpu/jit/codegen_x86.c b/src/cpu/jit/codegen_x86.c
index 0e1f61c1..c2eb46ec 100644
--- a/src/cpu/jit/codegen_x86.c
+++ b/src/cpu/jit/codegen_x86.c
@@ -3620,6 +3620,7 @@ enum {
X86_VENDOR_RISE = 6,
X86_VENDOR_TRANSMETA = 7,
X86_VENDOR_NSC = 8,
+ X86_VENDOR_HYGON = 9,
X86_VENDOR_UNKNOWN = 0xff
};
@@ -3674,6 +3675,8 @@ static void x86_get_cpu_vendor(struct cpuinfo_x86 *c)
c->x86_vendor = X86_VENDOR_INTEL;
else if (!strcmp(v, "AuthenticAMD"))
c->x86_vendor = X86_VENDOR_AMD;
+ else if (!strcmp(v, "HygonGenuine"))
+ c->x86_vendor = X86_VENDOR_HYGON;
else if (!strcmp(v, "CyrixInstead"))
c->x86_vendor = X86_VENDOR_CYRIX;
else if (!strcmp(v, "Geode by NSC"))
@@ -3840,6 +3843,7 @@ static void raw_init_cpu(void)
c->x86_processor = X86_PROCESSOR_PENTIUM4;
break;
case X86_VENDOR_AMD:
+ case X86_VENDOR_HYGON:
/* Assume a 32-bit Athlon processor if not in long mode */
c->x86_processor = X86_PROCESSOR_ATHLON;
break;
--
2.17.1