summaryrefslogtreecommitdiff
path: root/features.c
diff options
context:
space:
mode:
authordavej <davej>2003-06-13 11:35:13 +0000
committerdavej <davej>2003-06-13 11:35:13 +0000
commit4f3b3f362205081394b2eaffd0ae2e87a5f892f7 (patch)
treeabdf9328f7a680fe7addd79b059ed5d66775d7ef /features.c
parent616f0f92998b383f895d3368b837fe562c8276d0 (diff)
2003-6-13 Jeremy Fitzhardinge <jeremy@goop.org>
* features.c: identify Intel extended flags.
Diffstat (limited to 'features.c')
-rw-r--r--features.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/features.c b/features.c
index f906d38..0e81c02 100644
--- a/features.c
+++ b/features.c
@@ -1,5 +1,5 @@
/*
- * $Id: features.c,v 1.23 2002/11/02 03:26:54 davej Exp $
+ * $Id: features.c,v 1.24 2003/06/13 11:35:13 davej Exp $
* This file is part of x86info
* (C) 2001 Dave Jones.
*
@@ -56,6 +56,12 @@ void decode_feature_flags (struct cpudata *cpu)
"IA-64 processor",
"Pending Break Enable"
};
+ const char *intel_cap_flags[] = {
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, "est",
+ "tm2", NULL, "cntx-id", NULL, NULL, NULL, NULL, NULL,
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL
+ };
const char *amd_cap_flags[] = {
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, "syscall", NULL, NULL, NULL, NULL,
@@ -78,7 +84,7 @@ void decode_feature_flags (struct cpudata *cpu)
cpuid(cpu->number, 0x00000001, &eax, &ebx, &ecx, &edx);
cpu->flags = edx;
if (cpu->vendor==VENDOR_INTEL) {
- cpu->eflags = ebx;
+ cpu->eflags = ecx;
} else {
if (cpu->maxei >= 0x80000001) {
cpuid(cpu->number, 0x80000001, &eax, &ebx, &ecx, &edx);
@@ -103,7 +109,6 @@ void decode_feature_flags (struct cpudata *cpu)
/* Vendor specific extensions. */
switch (cpu->vendor) {
-
case VENDOR_AMD:
printf ("Extended feature flags:\n");
for (i = 0; i < 32; i++) {
@@ -132,6 +137,11 @@ void decode_feature_flags (struct cpudata *cpu)
break;
case VENDOR_INTEL:
+ printf ("Extended feature flags:\n");
+ for (i = 0; i < 32; i++) {
+ if (cpu->eflags & (1 << i) && intel_cap_flags[i])
+ printf (" %s", intel_cap_flags[i]);
+ }
break;
default: