summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--Intel/identify.c27
-rw-r--r--TODO5
-rw-r--r--connector.c7
-rw-r--r--features.c10
-rw-r--r--identify.c12
-rw-r--r--x86info.c8
-rw-r--r--x86info.h4
8 files changed, 62 insertions, 17 deletions
diff --git a/ChangeLog b/ChangeLog
index 18c0680..71e7fc9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2002-11-02 Dave Jones <davej@codemonkey.org.uk>
+
+ * identify.c: Print out URLs to errata/datasheet if known.
+ * x86info.c: Add -u & --urls
+ * Intel/identify.c: Add Pentium 4 URLs
+
2002-10-30 Dave Jones <davej@codemonkey.org.uk>
* features.c: Correct typos.
diff --git a/Intel/identify.c b/Intel/identify.c
index 3d3f745..db25c19 100644
--- a/Intel/identify.c
+++ b/Intel/identify.c
@@ -1,5 +1,5 @@
/*
- * $Id: identify.c,v 1.33 2002/10/30 03:11:20 davej Exp $
+ * $Id: identify.c,v 1.34 2002/11/02 03:26:54 davej Exp $
* This file is part of x86info.
* (C) 2001 Dave Jones.
*
@@ -14,9 +14,14 @@
*/
#include <stdio.h>
+#include <string.h>
#include "../x86info.h"
#include "Intel.h"
+static char p4_423_datasheet[]="http://developer.intel.com/design/pentium4/datashts/24919805.pdf";
+static char p4_478_datasheet[]="http://developer.intel.com/design/pentium4/datashts/24988703.pdf\n\thttp://developer.intel.com/design/pentium4/datashts/29864304.pdf";
+static char p4_errata[]="http://developer.intel.com/design/pentium4/specupdt/24919928.pdf";
+
/* Decode Intel TLB and cache info descriptors */
//TODO : Errata workaround. http://www.sandpile.org/post/msgs/20002736.htm
void decode_Intel_TLB (int x, int family)
@@ -419,6 +424,8 @@ void Identify_Intel (struct cpudata *cpu)
case 0xF00: /* Family 15 */
cpu->connector = CONN_SOCKET_423;
+ cpu->datasheet_url = strdup (p4_423_datasheet);
+ cpu->errata_url = strdup (p4_errata);
nameptr += sprintf (cpu->name, "%s", "Pentium 4");
switch (cpu->stepping) {
case 7:
@@ -429,8 +436,12 @@ void Identify_Intel (struct cpudata *cpu)
break;
}
break;
+
case 0xF10:
+ cpu->connector = CONN_SOCKET_423;
nameptr += sprintf (cpu->name, "%s", "Pentium 4 (Willamette)");
+ cpu->datasheet_url = strdup (p4_423_datasheet);
+ cpu->errata_url = strdup (p4_errata);
switch (cpu->stepping) {
case 1:
nameptr+=sprintf (nameptr, "%s", " [C0]");
@@ -444,6 +455,9 @@ void Identify_Intel (struct cpudata *cpu)
}
break;
case 0xF20:
+ cpu->connector = CONN_SOCKET_478;
+ cpu->datasheet_url = strdup (p4_478_datasheet);
+ cpu->errata_url = strdup (p4_errata);
nameptr += sprintf (cpu->name, "%s", "Pentium 4 Xeon (Northwood)");
switch (cpu->stepping) {
case 4:
@@ -456,6 +470,9 @@ void Identify_Intel (struct cpudata *cpu)
break;
case 0xF40:
case 0xF50:
+ cpu->connector = CONN_SOCKET_478;
+ cpu->datasheet_url = strdup (p4_478_datasheet);
+ cpu->errata_url = strdup (p4_errata);
nameptr+=sprintf (cpu->name, "%s", "P4 Xeon (Foster)");
break;
default:
@@ -523,6 +540,7 @@ void display_Intel_info (struct cpudata *cpu)
decode_Intel_TLB (edx >> 24, cpu->family);
}
}
+ printf ("\n");
}
if (cpu->maxi >= 3) {
@@ -552,4 +570,11 @@ void display_Intel_info (struct cpudata *cpu)
/* FIXME: Bit test for MCA here!*/
if (show_bluesmoke)
decode_Intel_bluesmoke(cpu->number, cpu->family);
+
+ /* Hyper-Threading Technology */
+ if (cpu->flags & (1 << 28)) {
+ int nr_ht = (cpu->eflags >> 16) & 0xFF;
+ printf ("Number of logical processors supported "
+ "within the physical package: %d\n\n", nr_ht);
+ }
}
diff --git a/TODO b/TODO
index a925c62..9aec10b 100644
--- a/TODO
+++ b/TODO
@@ -1,12 +1,7 @@
-- introduce verbosity (-v/-vv/-vvv) options to do 'everything'. -a output is
- getting too verbose without it.
-
- introduce hexdump option (-x) to dump register values in addition to decoding.
- Identify Transmeta CPUs.
-- Disallow --mtrr on cpu's that don't have MTRRs.
-
- Decode mtrr registers as well as dumping them
- Dump cyrix ARR registers when we pass --mtrr
diff --git a/connector.c b/connector.c
index 2079125..4af6ccf 100644
--- a/connector.c
+++ b/connector.c
@@ -28,6 +28,7 @@ void decode_connector(unsigned int type)
char conn_slot_1[] = "Slot 1 (242 Contact Cartridge)";
char conn_slot_2[] = "Slot 2 (SEC Cartridge)";
char conn_socket_423[] = "Socket423 (PGA423 Socket)";
+ char conn_socket_478[] = "Socket478 (PGA478 Socket)";
char conn_MMC[] = "Mobile Module Connector (BGA)";
char conn_MMC2[] = "Mobile Module Connector (MMC-2)";
/* Transmeta specific sockets */
@@ -108,6 +109,10 @@ void decode_connector(unsigned int type)
printf("%s", conn_socket_423);
break;
+ case CONN_SOCKET_478:
+ printf("%s", conn_socket_478);
+ break;
+
case CONN_MMC:
printf("%s", conn_MMC);
break;
@@ -133,6 +138,6 @@ void decode_connector(unsigned int type)
break;
}
- printf("\n");
+ printf("\n\n");
}
diff --git a/features.c b/features.c
index 28624f4..f906d38 100644
--- a/features.c
+++ b/features.c
@@ -1,5 +1,5 @@
/*
- * $Id: features.c,v 1.22 2002/10/30 14:53:21 davej Exp $
+ * $Id: features.c,v 1.23 2002/11/02 03:26:54 davej Exp $
* This file is part of x86info
* (C) 2001 Dave Jones.
*
@@ -132,13 +132,7 @@ void decode_feature_flags (struct cpudata *cpu)
break;
case VENDOR_INTEL:
- /* Hyper-Threading Technology */
- if (cpu->flags & (1 << 28)) {
- int nr_ht = (cpu->eflags >> 16) & 0xFF;
- printf ("Number of logical processors supported "
- "within the physical package: %d\n", nr_ht);
- }
- break;
+ break;
default:
/* Unknown CPU manufacturer or no special handling needed */
diff --git a/identify.c b/identify.c
index 8a0d6df..2ccaffa 100644
--- a/identify.c
+++ b/identify.c
@@ -1,5 +1,5 @@
/*
- * $Id: identify.c,v 1.24 2002/07/12 01:48:59 davej Exp $
+ * $Id: identify.c,v 1.25 2002/11/02 03:26:54 davej Exp $
* This file is part of x86info.
* (C) 2001 Dave Jones.
*
@@ -104,6 +104,16 @@ void show_info(struct cpudata *cpu)
if (show_connector)
decode_connector (cpu->connector);
+ if (show_urls) {
+ if (cpu->datasheet_url != NULL)
+ printf ("Datasheet: %s\n", cpu->datasheet_url);
+
+ if (cpu->errata_url != NULL)
+ printf ("Errata: %s\n", cpu->errata_url);
+
+ printf ("\n");
+ }
+
if (!user_is_root)
return;
diff --git a/x86info.c b/x86info.c
index 465ab54..db2aef9 100644
--- a/x86info.c
+++ b/x86info.c
@@ -1,5 +1,5 @@
/*
- * $Id: x86info.c,v 1.61 2002/10/30 14:53:21 davej Exp $
+ * $Id: x86info.c,v 1.62 2002/11/02 03:26:54 davej Exp $
* This file is part of x86info.
* (C) 2001 Dave Jones.
*
@@ -36,6 +36,7 @@ int show_cacheinfo=0;
int show_bluesmoke=0;
int show_mtrr=0;
int show_connector=0;
+int show_urls=0;
static int show_mptable=0;
static int show_MHz=0;
@@ -62,6 +63,7 @@ void usage (char *programname)
--mtrr\n\
-r, --registers\n\
-s, --show-bluesmoke\n\
+-u, --urls\n\
\n", programname);
exit (0);
}
@@ -82,6 +84,7 @@ static void parse_command_line (int argc, char **argv)
show_registers = 1;
show_mtrr = 1;
show_connector = 1;
+ show_urls = 1;
need_root = 1;
}
@@ -125,6 +128,9 @@ static void parse_command_line (int argc, char **argv)
show_bluesmoke = 1;
}
+ if ((!strcmp(arg, "-u") || !strcmp(arg, "--urls")))
+ show_urls = 1;
+
if ((!strcmp(arg, "-v") || !strcmp(arg, "--verbose")))
verbose = 1;
diff --git a/x86info.h b/x86info.h
index 33ef92a..0e47b35 100644
--- a/x86info.h
+++ b/x86info.h
@@ -34,6 +34,8 @@ struct cpudata {
unsigned char connector;
unsigned int flags;
unsigned int eflags;
+ char * datasheet_url;
+ char * errata_url;
};
#define tuple(c) ((c->family<<8)|(c->model<<4)|(c->stepping))
@@ -62,6 +64,7 @@ struct cpudata {
#define CONN_BGA474 21
#define CONN_BGA 22
#define CONN_SOCKET_754 23
+#define CONN_SOCKET_478 24
void cpuid (int, int, unsigned long *, unsigned long *, unsigned long *, unsigned long *);
void cpuid_UP (int, unsigned long *, unsigned long *, unsigned long *, unsigned long *);
@@ -108,6 +111,7 @@ extern int verbose;
extern int show_msr;
extern int show_mtrr;
extern int show_registers;
+extern int show_urls;
extern unsigned int nrCPUs;