public inbox for cygwin-cvs@sourceware.org
help / color / mirror / Atom feed
* [newlib-cygwin] Add support for Hygon Dhyana processor
@ 2019-06-03 8:40 Corinna Vinschen
0 siblings, 0 replies; only message in thread
From: Corinna Vinschen @ 2019-06-03 8:40 UTC (permalink / raw)
To: cygwin-cvs
https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=ee7e49e19388fd0f19ca1c4773d3efc5fa123d58
commit ee7e49e19388fd0f19ca1c4773d3efc5fa123d58
Author: Jinke Fan <fanjinke@hygon.cn>
Date: Fri May 17 11:29:11 2019 +0800
Add support for Hygon Dhyana processor
-Add vendor identification
-Support in get_cpu_cache
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
Signed-off-by: Jinke Fan <fanjinke@hygon.cn>
Diff:
---
winsup/cygwin/fhandler_proc.cc | 3 ++-
winsup/cygwin/sysconf.cc | 3 ++-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/winsup/cygwin/fhandler_proc.cc b/winsup/cygwin/fhandler_proc.cc
index a6a0b68..c461bbc 100644
--- a/winsup/cygwin/fhandler_proc.cc
+++ b/winsup/cygwin/fhandler_proc.cc
@@ -706,7 +706,8 @@ format_proc_cpuinfo (void *, char *&destbuf)
/* Vendor identification. */
bool is_amd = false, is_intel = false;
- if (!strcmp ((char*)vendor_id, "AuthenticAMD"))
+ if (!strcmp ((char*)vendor_id, "AuthenticAMD")
+ || !strcmp((char*)vendor_id, "HygonGenuine"))
is_amd = true;
else if (!strcmp ((char*)vendor_id, "GenuineIntel"))
is_intel = true;
diff --git a/winsup/cygwin/sysconf.cc b/winsup/cygwin/sysconf.cc
index 216e514..3440c09 100644
--- a/winsup/cygwin/sysconf.cc
+++ b/winsup/cygwin/sysconf.cc
@@ -486,7 +486,8 @@ get_cpu_cache (int in)
vendor_id[3] = 0;
if (!strcmp ((char*) vendor_id, "GenuineIntel"))
return get_cpu_cache_intel (in, maxf & 0xffff);
- else if (!strcmp ((char*)vendor_id, "AuthenticAMD"))
+ else if (!strcmp ((char*)vendor_id, "AuthenticAMD")
+ || !strcmp((char*)vendor_id, "HygonGenuine"))
{
uint32_t maxe = 0, unused;
cpuid (&maxe, &unused, &unused, &unused, 0x80000000);
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2019-06-03 8:40 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-03 8:40 [newlib-cygwin] Add support for Hygon Dhyana processor Corinna Vinschen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).