rem: else print_cache_descriptors(&cpuInfo);
add: } else print_cache_descriptors(cpu);
context: dump_cpu(system_info *info, int32 cpu){	/* references:	 *	 * http://grafi.ii.pw.edu.pl/gbm/x86/cpuid.html	 * http://www.sandpile.org/ia32/cpuid.htm	 * http://www.amd.com/us-en/assets/content_type/white_papers_and_tech_docs/TN13.pdf (Duron erratum)	 */	cpuid_info baseInfo;	cpuid_info cpuInfo;	int32 max_eax, max_extended_eax = 0;	if (get_cpuid(&baseInfo, 0, cpu) != B_OK) {		// this CPU doesn't support cpuid		return;	}	max_eax = baseInfo.eax_0.max_eax;	if (max_eax >= 500)		max_eax = 0; /* old Pentium sample chips has cpu signature here */	/* Extended cpuid */	get_cpuid(&cpuInfo, 0x80000000, cpu);	// extended cpuid is only supported if max_eax is greater than the service id	if (cpuInfo.eax_0.max_eax > 0x80000000)		max_extended_eax = cpuInfo.eax_0.max_eax & 0xff;	if (max_extended_eax >=4 ) {		char buffer[49];		char *name = buffer;		int32 i;		memset(buffer, 0, sizeof(buffer));		for (i = 0; i < 3; i++) {			get_cpuid(&cpuInfo, 0x80000002 + i, cpu);			memcpy(name, &cpuInfo.regs.eax, 4);			memcpy(name + 4, &cpuInfo.regs.ebx, 4);			memcpy(name + 8, &cpuInfo.regs.ecx, 4);			memcpy(name + 12, &cpuInfo.regs.edx, 4);			name += 16;		}		// cut off leading spaces (names are right aligned)		name = buffer;		while (name[0] == ' ')			name++;		printf("CPU #%ld: \"%s\"\n", cpu, name);	} else {		printf("CPU #%ld: %.12s\n", cpu, baseInfo.eax_0.vendor_id);		if (max_eax == 0)			return;	}	get_cpuid(&cpuInfo, 1, cpu);	printf("\ttype %u, family %u, model %u, stepping %u, features 0x%08lx\n", 			cpuInfo.eax_1.type,			cpuInfo.eax_1.family,			cpuInfo.eax_1.model,			cpuInfo.eax_1.stepping,			cpuInfo.eax_1.features);	print_features(cpuInfo.eax_1.features);	/* Extended CPUID */	if (max_extended_eax >= 1 && (info->cpu_type & B_CPU_x86_VENDOR_MASK) == B_CPU_AMD_x86) {		get_cpuid(&cpuInfo, 0x80000001, cpu);		printf("\textended: generation %lu, model %lu, stepping %lu, features 0x%08lx\n",			(cpuInfo.regs.eax >> 8) & 0xff, (cpuInfo.regs.eax >> 4) & 0xff,			cpuInfo.regs.eax & 0xff, cpuInfo.regs.edx);		print_amd_features(cpuInfo.regs.edx);	}	/* Cache/TLB descriptors */	if (max_extended_eax >= 5) {		get_cpuid(&cpuInfo, 0x80000005, cpu);		if (!strncmp(baseInfo.eax_0.vendor_id, "CyrixInstead", 12))			print_intel_cache_descriptors(&cpuInfo);		else			print_cache_descriptors(&cpuInfo);	}	if (max_eax >= 2) {		do {			get_cpuid(&cpuInfo, 2, cpu);			if (cpuInfo.eax_2.call_num > 0)				print_intel_cache_descriptors(&cpuInfo);		} while (cpuInfo.eax_2.call_num > 1);	}	/* Serial number */	if (max_eax >= 3) {		cpuid_info flagsInfo;		get_cpuid(&flagsInfo, 1, cpu);		if (flagsInfo.eax_1.features & (1UL << 18)) {			get_cpuid(&cpuInfo, 3, cpu);			printf("Serial number: %04lx-%04lx-%04lx-%04lx-%04lx-%04lx\n",				flagsInfo.eax_1.features >> 16, flagsInfo.eax_1.features & 0xffff,				cpuInfo.regs.edx >> 16, cpuInfo.regs.edx & 0xffff,				cpuInfo.regs.ecx >> 16, cpuInfo.regs.edx & 0xffff);		}	}	putchar('\n');}