diff options
author | Dave Jones <davej@redhat.com> | 2008-07-02 17:32:29 -0400 |
---|---|---|
committer | Dave Jones <davej@redhat.com> | 2008-07-02 17:32:29 -0400 |
commit | e669497acbd46ef90ae13287824bb9e4d462565b (patch) | |
tree | cad59ee52b33be7bfc28321f0f83a8c4d539c0dc /features.c | |
parent | a1e204c7b980c92257103b3071b37c73e4316939 (diff) |
Break up the feature flags routine into two. "get" and "show"
Diffstat (limited to 'features.c')
-rw-r--r-- | features.c | 28 |
1 files changed, 15 insertions, 13 deletions
@@ -24,7 +24,21 @@ void flag_decode(unsigned long reg, const char *flags[]) } -void decode_feature_flags(struct cpudata *cpu) +void get_feature_flags(struct cpudata *cpu) +{ + unsigned int eax, ebx, ecx, edx; + + cpuid(cpu->number, 0x00000001, &eax, &ebx, &ecx, &edx); + cpu->flags_ecx = ecx; + cpu->flags_edx = edx; + if (cpu->maxei >= 0x80000001) { + cpuid(cpu->number, 0x80000001, &eax, &ebx, &ecx, &edx); + cpu->eflags_ecx = ecx; + cpu->eflags_edx = edx; + } +} + +void show_feature_flags(struct cpudata *cpu) { unsigned int eax, ebx, ecx, edx; unsigned int i; @@ -134,18 +148,6 @@ void decode_feature_flags(struct cpudata *cpu) NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }; - cpuid(cpu->number, 0x00000001, &eax, &ebx, &ecx, &edx); - cpu->flags_ecx = ecx; - cpu->flags_edx = edx; - if (cpu->maxei >= 0x80000001) { - cpuid(cpu->number, 0x80000001, &eax, &ebx, &ecx, &edx); - cpu->eflags_ecx = ecx; - cpu->eflags_edx = edx; - } - - if (silent != 0) - return; - printf("Feature flags:\n"); for (i=0; i<32; i++) { if (cpu->flags_edx & (1 << i)) { |