From 6f27351f5b7e53af7ad58ddcf76c16b33fc5027b Mon Sep 17 00:00:00 2001 From: lijing22222 Date: Mon, 4 Mar 2024 11:17:32 +0800 Subject: [PATCH] Add Hygon Support --- glibc-Add-Hygon-Support.patch | 29 +++++++++++++++++++++++++++++ glibc.spec | 3 ++- 2 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 glibc-Add-Hygon-Support.patch diff --git a/glibc-Add-Hygon-Support.patch b/glibc-Add-Hygon-Support.patch new file mode 100644 index 0000000..8f03a33 --- /dev/null +++ b/glibc-Add-Hygon-Support.patch @@ -0,0 +1,29 @@ +From 4e32231c73cb7a9b004fb160d03c26498ec3860d Mon Sep 17 00:00:00 2001 +From: Zhao Hang +Date: Tue, 28 May 2024 10:10:11 +0800 +Subject: [PATCH] Add Hygon Support + +Signed-off-by: Zhao Hang +--- + sysdeps/x86/cpu-features.c | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +diff --git a/sysdeps/x86/cpu-features.c b/sysdeps/x86/cpu-features.c +index 1248a702..c72dc2f3 100644 +--- a/sysdeps/x86/cpu-features.c ++++ b/sysdeps/x86/cpu-features.c +@@ -546,8 +546,9 @@ init_cpu_features (struct cpu_features *cpu_features) + |= bit_arch_Prefer_AVX2_STRCMP; + } + } +- /* This spells out "AuthenticAMD". */ +- else if (ebx == 0x68747541 && ecx == 0x444d4163 && edx == 0x69746e65) ++ /* This spells out "AuthenticAMD" or "HygonGenuine". */ ++ else if ((ebx == 0x68747541 && ecx == 0x444d4163 && edx == 0x69746e65)||(ebx == 0x6f677948 && ecx == 0x656e6975 && edx == 0x6e65476e)) ++ + { + unsigned int extended_model; + +-- +2.31.1 + diff --git a/glibc.spec b/glibc.spec index 407243a..f98cdf5 100644 --- a/glibc.spec +++ b/glibc.spec @@ -1200,7 +1200,7 @@ Patch2005: glibc-elf-Fix-tst-align3.patch Patch2006: glibc-Sync-to-lnd-35-for-LoongArch.patch Patch2007: Fix-tst-cancel21.c-to-suit-kernel-struct-sigcontext-.patch Patch2008: glibc-aarch64-Increase-small-and-medium-cases-for-__memcpy.patch - +Patch2009: glibc-Add-Hygon-Support.patch ############################################################################## # Continued list of core "glibc" package information: ############################################################################## @@ -3041,6 +3041,7 @@ fi - Sync loongarch64 code to lnd.35. (lixing@loongson.cn) - Add patch for gb18030-2022 from upstream bug#30243 (fundawang@yeah.net) - aarch64: Increase small and medium cases for __memcpy_generic (bug#7060) (Kaiqiang Wang) +- Add Hygon Support (Jing Li) * Fri Apr 26 2024 Florian Weimer - 2.28-251.2 - CVE-2024-33599: nscd: buffer overflow in netgroup cache (RHEL-34264)