summaryrefslogtreecommitdiff
path: root/identify.c
diff options
context:
space:
mode:
authordavej <davej>2002-07-12 01:31:17 +0000
committerdavej <davej>2002-07-12 01:31:17 +0000
commit7d9be3d94ff2c64240a08418bb287da789d0fb12 (patch)
tree1bc41c566071c5ca0010cc742c9b5d7ece2fd38c /identify.c
parent031341ef32327aabdf05fdfaa2eef466c96043a3 (diff)
move dumpregs() to identify.c
Diffstat (limited to 'identify.c')
-rw-r--r--identify.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/identify.c b/identify.c
index 08c4d4a..4eade84 100644
--- a/identify.c
+++ b/identify.c
@@ -1,5 +1,5 @@
/*
- * $Id: identify.c,v 1.22 2002/07/12 01:28:36 davej Exp $
+ * $Id: identify.c,v 1.23 2002/07/12 01:31:17 davej Exp $
* This file is part of x86info.
* (C) 2001 Dave Jones.
*
@@ -10,6 +10,20 @@
#include <stdio.h>
#include "x86info.h"
+void dumpregs (int cpunum, unsigned int begin, unsigned int end)
+{
+ unsigned int i;
+ unsigned long eax, ebx, ecx, edx;
+
+ /* Dump all the CPUID results in raw hex */
+ for (i=begin; i<=end; i++) {
+ cpuid (cpunum, i, &eax, &ebx, &ecx, &edx);
+ printf ("eax in: 0x%08x, eax = %08lx ebx = %08lx ecx = %08lx edx = %08lx\n", i, eax, ebx, ecx, edx);
+ }
+ printf ("\n");
+}
+
+
void identify (struct cpudata *cpu)
{
unsigned long maxi, maxei, eax, ebx, ecx, edx;