Lines Matching full:leaf
56 /* Represent one leaf (basic or extended) */
60 * then the leafs[0] is the main leaf
114 static void leaf_print_raw(struct subleaf *leaf) in leaf_print_raw() argument
116 if (has_subleafs(leaf->index)) { in leaf_print_raw()
117 if (leaf->sub == 0) in leaf_print_raw()
118 printf("0x%08x: subleafs:\n", leaf->index); in leaf_print_raw()
121 leaf->sub, leaf->eax, leaf->ebx, leaf->ecx, leaf->edx); in leaf_print_raw()
124 leaf->index, leaf->eax, leaf->ebx, leaf->ecx, leaf->edx); in leaf_print_raw()
133 struct subleaf *leaf; in cpuid_store() local
148 perror("malloc func leaf"); in cpuid_store()
153 func->leafs = realloc(func->leafs, (s + 1) * sizeof(*leaf)); in cpuid_store()
160 leaf = &func->leafs[s]; in cpuid_store()
162 leaf->index = f; in cpuid_store()
163 leaf->sub = subleaf; in cpuid_store()
164 leaf->eax = a; in cpuid_store()
165 leaf->ebx = b; in cpuid_store()
166 leaf->ecx = c; in cpuid_store()
167 leaf->edx = d; in cpuid_store()
187 /* Skip leaf without valid items */ in raw_dump_range()
191 /* First item is the main leaf, followed by all subleafs */ in raw_dump_range()
277 * LEAF,SUBLEAF,register_name,bits,short name,long description
289 struct subleaf *leaf; in parse_line() local
296 * 1. leaf in parse_line()
328 /* index/main-leaf */ in parse_line()
386 leaf = &func->leafs[sub]; in parse_line()
387 reg = &leaf->info[reg_index]; in parse_line()
483 static void show_leaf(struct subleaf *leaf) in show_leaf() argument
485 if (!leaf) in show_leaf()
489 leaf_print_raw(leaf); in show_leaf()
493 leaf->index, leaf->sub); in show_leaf()
496 decode_bits(leaf->eax, &leaf->info[R_EAX], R_EAX); in show_leaf()
497 decode_bits(leaf->ebx, &leaf->info[R_EBX], R_EBX); in show_leaf()
498 decode_bits(leaf->ecx, &leaf->info[R_ECX], R_ECX); in show_leaf()
499 decode_bits(leaf->edx, &leaf->info[R_EDX], R_EDX); in show_leaf()
551 /* Only show specific leaf/subleaf info */ in show_info()
596 printf("kcpuid [-abdfhr] [-l leaf] [-s subleaf]\n" in usage()
602 "\t-l|--leaf=index Specify the leaf you want to check\n" in usage()
614 { "leaf", required_argument, NULL, 'l'}, /* only check a specific leaf */
615 { "raw", no_argument, NULL, 'r'}, /* show raw CPUID leaf data */
644 /* main leaf */ in parse_options()
665 * 2. Parse and store all the CPUID leaf data supported on this platform