Skip to content

Commit

Permalink
leaf 0x00000007: print unrecognized bits in ebx
Browse files Browse the repository at this point in the history
Signed-off-by: Steven Noonan <steven@uplinklabs.net>
  • Loading branch information
tycho committed May 10, 2012
1 parent 526a1d7 commit c2267f8
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion feature.c
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,7 @@ void print_features(struct cpu_regs_t *regs, struct cpuid_state_t *state)
{
const struct cpu_feature_t *p = features;
uint8_t count = 0;
uint8_t unaccounted = 0;
switch(state->last_leaf.eax) {
case 0x00000001:
printf("Base features:\n");
Expand Down Expand Up @@ -365,6 +366,13 @@ void print_features(struct cpu_regs_t *regs, struct cpuid_state_t *state)
if (count != 0)
printf("\n");

if (regs->ebx && state->last_leaf.eax == 0x00000007)
unaccounted = 1;

if (regs->ecx || regs->edx)
printf("Unaccounted for: %08x %08x\n", regs->ecx, regs->edx);
unaccounted = 1;

if (unaccounted)
printf("Unaccounted for: ebx:0x%08x ecx:0x%08x edx:0x%08x\n",
regs->ebx, regs->ecx, regs->edx);
}

0 comments on commit c2267f8

Please sign in to comment.