diff options
author | Dave Jones <davej@redhat.com> | 2011-02-22 19:26:58 -0500 |
---|---|---|
committer | Dave Jones <davej@redhat.com> | 2011-02-22 19:26:58 -0500 |
commit | 560d98b10bf8155a3724ef2c0745b613cd26ce5e (patch) | |
tree | 971d563106374a6d3951c9a9963a458fa7e99404 | |
parent | 5cd155a02560f8d253b429a77cb03416c2607825 (diff) |
move dump_raw_cpuid into cpuid.c
-rw-r--r-- | Makefile | 1 | ||||
-rw-r--r-- | cpuid.c | 14 | ||||
-rw-r--r-- | dumpregs.c | 21 | ||||
-rw-r--r-- | x86info.c | 6 | ||||
-rw-r--r-- | x86info.h | 2 |
5 files changed, 18 insertions, 26 deletions
@@ -80,7 +80,6 @@ X86INFO_SRC =\ commandline.c\ havecpuid.c\ cpuid.c\ - dumpregs.c\ features.c\ identify.c\ rdmsr.c\ @@ -232,3 +232,17 @@ unsigned int cpuid_ebx(unsigned int CPU_number, unsigned int op) return ebx; } + + +void dump_raw_cpuid(int cpunum, unsigned int begin, unsigned int end) +{ + unsigned int i; + unsigned int 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 = %08x ebx = %08x ecx = %08x edx = %08x\n", i, eax, ebx, ecx, edx); + } + printf("\n"); +} diff --git a/dumpregs.c b/dumpregs.c deleted file mode 100644 index 0585506..0000000 --- a/dumpregs.c +++ /dev/null @@ -1,21 +0,0 @@ -/* - * (C) 2001,2008 Dave Jones. - * - * Licensed under the terms of the GNU GPL License version 2. - */ - -#include <stdio.h> -#include "x86info.h" - -void dumpregs(int cpunum, unsigned int begin, unsigned int end) -{ - unsigned int i; - unsigned int 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 = %08x ebx = %08x ecx = %08x edx = %08x\n", i, eax, ebx, ecx, edx); - } - printf("\n"); -} @@ -38,12 +38,12 @@ static void display_detailed_info(struct cpudata *cpu) show_info(cpu); if (show_cpuid) { - dumpregs(cpu->number, 0, cpu->cpuid_level); + dump_raw_cpuid(cpu->number, 0, cpu->cpuid_level); if (cpu->maxei >=0x80000000) - dumpregs (cpu->number, 0x80000000, cpu->maxei); + dump_raw_cpuid(cpu->number, 0x80000000, cpu->maxei); if (cpu->maxei2 >=0xC0000000) - dumpregs (cpu->number, 0xC0000000, cpu->maxei2); + dump_raw_cpuid(cpu->number, 0xC0000000, cpu->maxei2); } if (show_cacheinfo) { @@ -157,7 +157,7 @@ void binary32(unsigned long value); void binary64(unsigned long long value); void dumpmsr(int cpunum, unsigned int msr, int size); void dumpmsr_bin(int cpunum, unsigned int msr, int size); -void dumpregs(int cpunum, unsigned int begin, unsigned int end); +void dump_raw_cpuid(int cpunum, unsigned int begin, unsigned int end); void dump_mtrrs(struct cpudata *cpu); void dump_apics(struct cpudata *cpu); |