summaryrefslogtreecommitdiff
path: root/util/msrtool
diff options
context:
space:
mode:
Diffstat (limited to 'util/msrtool')
-rw-r--r--util/msrtool/msrtool.h4
-rw-r--r--util/msrtool/sys.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/util/msrtool/msrtool.h b/util/msrtool/msrtool.h
index 1e923c4bfd..35559c2fb8 100644
--- a/util/msrtool/msrtool.h
+++ b/util/msrtool/msrtool.h
@@ -95,8 +95,8 @@ struct msrdef {
#define MAX_CORES 8
typedef enum {
- VENDOR_INTEL = 1,
- VENDOR_AMD = 2,
+ VENDOR_INTEL = 0x756e6547,
+ VENDOR_AMD = 0x68747541,
} vendor_t;
struct cpuid_t {
diff --git a/util/msrtool/sys.c b/util/msrtool/sys.c
index 3e50f49a26..7ff1131b63 100644
--- a/util/msrtool/sys.c
+++ b/util/msrtool/sys.c
@@ -36,7 +36,7 @@ struct cpuid_t *cpuid(void) {
asm ("cpuid" : "=b" (outebx) : "a" (0) : "%ecx", "%edx");
#endif
- id.vendor = (outebx == 0x756e6547) ? VENDOR_INTEL : VENDOR_AMD;
+ id.vendor = outebx;
/* Then, identificate CPU itself */
#if defined(__DARWIN__) && !defined(__LP64__)