diff --git a/compat/non_win/dbghelp.h b/compat/non_win/dbghelp.h index 5ce88b88..ded912e7 100644 --- a/compat/non_win/dbghelp.h +++ b/compat/non_win/dbghelp.h @@ -214,7 +214,7 @@ union __attribute__((packed, aligned(4))) CPU_INFORMATION { //! `cpuid 0x80000001` `edx`. //! //! This field is only valid if #VendorId identifies the CPU vendor as - //! “AuthenticAMD”. + //! “AuthenticAMD” or "HygonGenuine". uint32_t AMDExtendedCpuFeatures; } X86CpuInfo; diff --git a/minidump/minidump_system_info_writer.cc b/minidump/minidump_system_info_writer.cc index 9bc013dc..06aeecda 100644 --- a/minidump/minidump_system_info_writer.cc +++ b/minidump/minidump_system_info_writer.cc @@ -151,7 +151,7 @@ void MinidumpSystemInfoWriter::InitializeFromSnapshot( SetCPUX86VersionAndFeatures(system_snapshot->CPUX86Signature(), system_snapshot->CPUX86Features() & 0xffffffff); - if (cpu_vendor == "AuthenticAMD") { + if (cpu_vendor == "AuthenticAMD" || cpu_vendor == "HygonGenuine") { SetCPUX86AMDExtendedFeatures( system_snapshot->CPUX86ExtendedFeatures() & 0xffffffff); } diff --git a/snapshot/linux/system_snapshot_linux_test.cc b/snapshot/linux/system_snapshot_linux_test.cc index 46d3845f..f3013b54 100644 --- a/snapshot/linux/system_snapshot_linux_test.cc +++ b/snapshot/linux/system_snapshot_linux_test.cc @@ -77,7 +77,8 @@ TEST(SystemSnapshotLinux, Basic) { EXPECT_PRED1( [](std::string vendor) { - return vendor == "GenuineIntel" || vendor == "AuthenticAMD"; + return vendor == "GenuineIntel" || vendor == "AuthenticAMD" || + vendor == "HygonGenuine"; }, system.CPUVendor());