x86: identify Hygon vendor

it's a Zen-based CPU: rely on AMD support code.

Change-Id: Ia980a42457575bf8d1130d813310a285bf137691
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3217
Reviewed-by: Adrien Destugues <[email protected]>
This commit is contained in:
Jérôme Duval
2020-09-15 20:43:45 +00:00
parent 7c1bcc9cae
commit 357b9d3cbb
7 changed files with 17 additions and 7 deletions
+2 -1
View File
@@ -499,7 +499,8 @@ enum cpu_vendor {
B_CPU_VENDOR_VIA,
B_CPU_VENDOR_IBM,
B_CPU_VENDOR_MOTOROLA,
B_CPU_VENDOR_NEC
B_CPU_VENDOR_NEC,
B_CPU_VENDOR_HYGON
};
typedef struct {
@@ -481,6 +481,7 @@ enum x86_vendors {
VENDOR_RISE,
VENDOR_TRANSMETA,
VENDOR_NSC,
VENDOR_HYGON,
VENDOR_NUM,
VENDOR_UNKNOWN,
+1 -1
View File
@@ -173,7 +173,7 @@ get_cpu_vendor_string(enum cpu_vendor cpuVendor)
// Should match vendors in OS.h
static const char* vendorStrings[] = {
NULL, "AMD", "Cyrix", "IDT", "Intel", "National Semiconductor", "Rise",
"Transmeta", "VIA", "IBM", "Motorola", "NEC"
"Transmeta", "VIA", "IBM", "Motorola", "NEC", "Hygon"
};
if ((size_t)cpuVendor >= sizeof(vendorStrings) / sizeof(const char*))