Lines Matching full: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) in leaf_print_raw() argument
126 if (has_subleafs(leaf->index)) { in leaf_print_raw()
127 if (leaf->sub == 0) in leaf_print_raw()
128 printf("0x%08x: subleafs:\n", leaf->index); in leaf_print_raw()
131 leaf->sub, leaf->eax, leaf->ebx, leaf->ecx, leaf->edx); in leaf_print_raw()
134 leaf->index, leaf->eax, leaf->ebx, leaf->ecx, leaf->edx); in leaf_print_raw()
143 struct subleaf *leaf; in cpuid_store() local
158 perror("malloc func leaf"); in cpuid_store()
163 func->leafs = realloc(func->leafs, (s + 1) * sizeof(*leaf)); in cpuid_store()
170 leaf = &func->leafs[s]; in cpuid_store()
172 leaf->index = f; in cpuid_store()
173 leaf->sub = subleaf; in cpuid_store()
174 leaf->eax = a; in cpuid_store()
175 leaf->ebx = b; in cpuid_store()
176 leaf->ecx = c; in cpuid_store()
177 leaf->edx = d; in cpuid_store()
197 /* Skip leaf without valid items */ in raw_dump_range()
201 /* First item is the main leaf, followed by all subleafs */ in raw_dump_range()
285 * LEAF,SUBLEAF,register_name,bits,short name,long description
297 struct subleaf *leaf; in parse_line() local
304 * 1. leaf in parse_line()
334 /* index/main-leaf */ in parse_line()
358 leaf = &func->leafs[sub]; in parse_line()
372 reg = &leaf->info[reg_index]; in parse_line()
476 static void show_leaf(struct subleaf *leaf) in show_leaf() argument
478 if (!leaf) in show_leaf()
482 leaf_print_raw(leaf); in show_leaf()
486 leaf->index, leaf->sub); in show_leaf()
489 decode_bits(leaf->eax, &leaf->info[R_EAX], R_EAX); in show_leaf()
490 decode_bits(leaf->ebx, &leaf->info[R_EBX], R_EBX); in show_leaf()
491 decode_bits(leaf->ecx, &leaf->info[R_ECX], R_ECX); in show_leaf()
492 decode_bits(leaf->edx, &leaf->info[R_EDX], R_EDX); in show_leaf()
544 /* Only show specific leaf/subleaf info */ in show_info()
589 printf("kcpuid [-abdfhr] [-l leaf] [-s subleaf]\n" in usage()
595 "\t-l|--leaf=index Specify the leaf you want to check\n" in usage()
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 */ in parse_options()
658 * 2. Parse and store all the CPUID leaf data supported on this platform