]> git.ipfire.org Git - thirdparty/open-vm-tools.git/commitdiff
Common header file change not applicable to open-vm-tools
authorOliver Kurth <okurth@vmware.com>
Fri, 26 Oct 2018 17:44:59 +0000 (10:44 -0700)
committerOliver Kurth <okurth@vmware.com>
Fri, 26 Oct 2018 17:44:59 +0000 (10:44 -0700)
open-vm-tools/lib/include/x86cpuid.h

index e9c5ff910f69cb0d03121ab892e908bcc70293b0..5c1ad9cdee48b565479b5dc9cde953b80822f789 100644 (file)
@@ -1483,6 +1483,8 @@ CPUIDCheck(int32 eaxIn, int32 eaxInCheck,
 #define CPUID_MODEL_EXCAVATOR_6F      0x6F // Max Excavator model defined in BKDG
 #define CPUID_MODEL_ZEN_00            0x00 // family == CPUID_FAMILY_ZEN
 #define CPUID_MODEL_ZEN_1F            0x1F // Max Zen model defined in BKDG
+#define CPUID_MODEL_ZEN2_30           0x30 // family == CPUID_FAMILY_ZEN
+#define CPUID_MODEL_ZEN2_3F           0x3F // Max Zen2 model
 
 /* VIA model information */
 #define CPUID_MODEL_NANO                15 // Isaiah
@@ -2050,6 +2052,15 @@ CPUID_MODEL_IS_ZEN(uint32 eax)
 }
 
 
+static INLINE Bool
+CPUID_MODEL_IS_ZEN2(uint32 eax)
+{
+  return CPUID_EFFECTIVE_FAMILY(eax) == CPUID_FAMILY_ZEN &&
+         (CPUID_EFFECTIVE_MODEL(eax) >= CPUID_MODEL_ZEN2_30 &&
+          CPUID_EFFECTIVE_MODEL(eax) <= CPUID_MODEL_ZEN2_3F);
+}
+
+
 static INLINE Bool
 CPUID_FAMILY_IS_DHYANA(uint32 eax)
 {