mirror of
https://github.com/chromium/crashpad.git
synced 2024-12-26 23:01:05 +08:00
Add support for Hygon Dhyana CPU
This patch is used to add support Hygon Dhyana x86 vendor id (HygonGenuine). More details can be found on: http://lkml.kernel.org/r/5ce86123a7b9dad925ac583d88d2f921040e859b.1538583282.git.puwen@hygon.cn Change-Id: I53445a8a63421811401b6a6a40e664d2600a3ec8 Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/1640959 Reviewed-by: Mark Mentovai <mark@chromium.org>
This commit is contained in:
parent
7500e2ef45
commit
e1b3bd11cd
@ -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;
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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());
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user