|
From: Jinke F. <fan...@ye...> - 2019-05-14 09:58:55
|
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/5ce...@hy...
The results of regression test suite:
== 709 tests, 3 stderr failures, 1 stdout failure, 0 stderrB failures, 0
stdoutB failures, 2 post failures ==
memcheck/tests/leak_cpp_interior (stderr)
memcheck/tests/overlap (stderr)
massif/tests/new-cpp (post)
massif/tests/overloaded-new (post)
none/tests/amd64/avx-1 (stdout)
exp-sgcheck/tests/stackerr (stderr)
...checking makefile consistency
...checking header files and include directives
Makefile:1354: recipe for target 'regtest' failed
make: *** [regtest] Error 1
Is there anything incorrectly?
Please let me know your comments.
Signed-off-by: Jinke Fan <fan...@ye...>
---
coregrind/m_cache.c | 3 ++-
coregrind/m_machine.c | 4 +++-
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/coregrind/m_cache.c b/coregrind/m_cache.c
index 974ca5dde..0cbaa137e 100644
--- a/coregrind/m_cache.c
+++ b/coregrind/m_cache.c
@@ -501,7 +501,8 @@ get_caches_from_CPUID(VexCacheInfo *ci)
if (0 == VG_(strcmp)(vendor_id, "GenuineIntel")) {
ret = Intel_cache_info(level, ci);
- } else if (0 == VG_(strcmp)(vendor_id, "AuthenticAMD")) {
+ } else if (0 == VG_(strcmp)(vendor_id, "AuthenticAMD") ||
+ 0 == VG_(strcmp)(vendor_id, "HygonGenuine")) {
ret = AMD_cache_info(ci);
} else if (0 == VG_(strcmp)(vendor_id, "CentaurHauls")) {
diff --git a/coregrind/m_machine.c b/coregrind/m_machine.c
index df842aab2..bb2010ccd 100644
--- a/coregrind/m_machine.c
+++ b/coregrind/m_machine.c
@@ -905,7 +905,8 @@ Bool VG_(machine_get_hwcaps)( void )
/* Figure out if this is an AMD that can do MMXEXT. */
have_mmxext = False;
- if (0 == VG_(strcmp)(vstr, "AuthenticAMD")
+ if (((0 == VG_(strcmp)(vstr, "AuthenticAMD")) ||
+ (0 == VG_(strcmp)(vstr, "HygonGenuine")))
&& max_extended >= 0x80000001) {
VG_(cpuid)(0x80000001, 0, &eax, &ebx, &ecx, &edx);
/* Some older AMD processors support a sse1 subset (Integer
SSE). */
@@ -915,6 +916,7 @@ Bool VG_(machine_get_hwcaps)( void )
/* Figure out if this is an AMD or Intel that can do LZCNT. */
have_lzcnt = False;
if ((0 == VG_(strcmp)(vstr, "AuthenticAMD")
+ || 0 == VG_(strcmp)(vstr, "HygonGenuine")
|| 0 == VG_(strcmp)(vstr, "GenuineIntel"))
&& max_extended >= 0x80000001) {
VG_(cpuid)(0x80000001, 0, &eax, &ebx, &ecx, &edx);
--
2.17.1
|