Lines Matching defs:leaf

55 /* Represent one leaf (basic or extended) */
59 * then the leafs[0] is the main leaf
124 static void leaf_print_raw(struct subleaf *leaf)
126 if (has_subleafs(leaf->index)) {
127 if (leaf->sub == 0)
128 printf("0x%08x: subleafs:\n", leaf->index);
131 leaf->sub, leaf->eax, leaf->ebx, leaf->ecx, leaf->edx);
134 leaf->index, leaf->eax, leaf->ebx, leaf->ecx, leaf->edx);
143 struct subleaf *leaf;
158 perror("malloc func leaf");
163 func->leafs = realloc(func->leafs, (s + 1) * sizeof(*leaf));
170 leaf = &func->leafs[s];
172 leaf->index = f;
173 leaf->sub = subleaf;
174 leaf->eax = a;
175 leaf->ebx = b;
176 leaf->ecx = c;
177 leaf->edx = d;
197 /* Skip leaf without valid items */
201 /* First item is the main leaf, followed by all subleafs */
297 struct subleaf *leaf;
304 * 1. leaf
334 /* index/main-leaf */
358 leaf = &func->leafs[sub];
372 reg = &leaf->info[reg_index];
476 static void show_leaf(struct subleaf *leaf)
478 if (!leaf)
482 leaf_print_raw(leaf);
486 leaf->index, leaf->sub);
489 decode_bits(leaf->eax, &leaf->info[R_EAX], R_EAX);
490 decode_bits(leaf->ebx, &leaf->info[R_EBX], R_EBX);
491 decode_bits(leaf->ecx, &leaf->info[R_ECX], R_ECX);
492 decode_bits(leaf->edx, &leaf->info[R_EDX], R_EDX);
544 /* Only show specific leaf/subleaf info */
589 printf("kcpuid [-abdfhr] [-l leaf] [-s subleaf]\n"
595 "\t-l|--leaf=index Specify the leaf you want to check\n"
607 { "leaf", required_argument, NULL, 'l'}, /* only check a specific leaf */
608 { "raw", no_argument, NULL, 'r'}, /* show raw CPUID leaf data */
637 /* main leaf */
658 * 2. Parse and store all the CPUID leaf data supported on this platform