diff options
author | davej <davej> | 2002-07-12 01:31:17 +0000 |
---|---|---|
committer | davej <davej> | 2002-07-12 01:31:17 +0000 |
commit | 7d9be3d94ff2c64240a08418bb287da789d0fb12 (patch) | |
tree | 1bc41c566071c5ca0010cc742c9b5d7ece2fd38c /identify.c | |
parent | 031341ef32327aabdf05fdfaa2eef466c96043a3 (diff) |
move dumpregs() to identify.c
Diffstat (limited to 'identify.c')
-rw-r--r-- | identify.c | 16 |
1 files changed, 15 insertions, 1 deletions
@@ -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; |