Lines Matching full:leaf
51 /* Represent one leaf (basic or extended) */
55 * then the leafs[0] is the main leaf
120 static void leaf_print_raw(struct subleaf *leaf) in leaf_print_raw() argument
122 if (has_subleafs(leaf->index)) { in leaf_print_raw()
123 if (leaf->sub == 0) in leaf_print_raw()
124 printf("0x%08x: subleafs:\n", leaf->index); in leaf_print_raw()
127 leaf->sub, leaf->eax, leaf->ebx, leaf->ecx, leaf->edx); in leaf_print_raw()
130 leaf->index, leaf->eax, leaf->ebx, leaf->ecx, leaf->edx); in leaf_print_raw()
139 struct subleaf *leaf; in cpuid_store() local
154 perror("malloc func leaf"); in cpuid_store()
159 func->leafs = realloc(func->leafs, (s + 1) * sizeof(*leaf)); in cpuid_store()
166 leaf = &func->leafs[s]; in cpuid_store()
168 leaf->index = f; in cpuid_store()
169 leaf->sub = subleaf; in cpuid_store()
170 leaf->eax = a; in cpuid_store()
171 leaf->ebx = b; in cpuid_store()
172 leaf->ecx = c; in cpuid_store()
173 leaf->edx = d; in cpuid_store()
193 /* Skip leaf without valid items */ in raw_dump_range()
197 /* First item is the main leaf, followed by all subleafs */ in raw_dump_range()
281 * LEAF,SUBLEAF,register_name,bits,short name,long description
293 struct subleaf *leaf; in parse_line() local
300 * 1. leaf in parse_line()
330 /* index/main-leaf */ in parse_line()
354 leaf = &func->leafs[sub]; in parse_line()
368 reg = &leaf->info[reg_index]; in parse_line()
466 static void show_leaf(struct subleaf *leaf) in show_leaf() argument
468 if (!leaf) in show_leaf()
472 leaf_print_raw(leaf); in show_leaf()
474 decode_bits(leaf->eax, &leaf->info[R_EAX]); in show_leaf()
475 decode_bits(leaf->ebx, &leaf->info[R_EBX]); in show_leaf()
476 decode_bits(leaf->ecx, &leaf->info[R_ECX]); in show_leaf()
477 decode_bits(leaf->edx, &leaf->info[R_EDX]); in show_leaf()
525 /* Only show specific leaf/subleaf info */ in show_info()
570 printf("kcpuid [-abdfhr] [-l leaf] [-s subleaf]\n" in usage()
576 "\t-l|--leaf=index Specify the leaf you want to check\n" in usage()
588 { "leaf", required_argument, NULL, 'l'}, /* only check a specific leaf */
589 { "raw", no_argument, NULL, 'r'}, /* show raw CPUID leaf data */
618 /* main leaf */ in parse_options()
639 * 2. Parse and store all the CPUID leaf data supported on this platform