View | Details | Raw Unified | Return to bug 14437
Collapse All | Expand All

(-)identcpu.c (-22 / +26 lines)
Lines 79-88 Link Here
79
u_int	cyrix_did;		/* Device ID of Cyrix CPU */
79
u_int	cyrix_did;		/* Device ID of Cyrix CPU */
80
int cpu_class = CPUCLASS_386;	/* least common denominator */
80
int cpu_class = CPUCLASS_386;	/* least common denominator */
81
char machine[] = "i386";
81
char machine[] = "i386";
82
SYSCTL_STRING(_hw, HW_MACHINE, machine, CTLFLAG_RD, machine, 0, "");
82
SYSCTL_STRING(_hw, HW_MACHINE, machine, CTLFLAG_RD, 
83
    machine, 0, "Machine class");
83
84
84
static char cpu_model[128];
85
static char cpu_model[128];
85
SYSCTL_STRING(_hw, HW_MODEL, model, CTLFLAG_RD, cpu_model, 0, "");
86
SYSCTL_STRING(_hw, HW_MODEL, model, CTLFLAG_RD, 
87
    cpu_model, 0, "Machine model");
86
88
87
static struct cpu_nameclass i386_cpus[] = {
89
static struct cpu_nameclass i386_cpus[] = {
88
	{ "Intel 80286",	CPUCLASS_286 },		/* CPU_286   */
90
	{ "Intel 80286",	CPUCLASS_286 },		/* CPU_286   */
Lines 126-132 Link Here
126
printcpuinfo(void)
128
printcpuinfo(void)
127
{
129
{
128
130
129
	u_int regs[4], nreg;
131
	u_int regs[4], nreg = 0;
130
	cpu_class = i386_cpus[cpu].cpu_class;
132
	cpu_class = i386_cpus[cpu].cpu_class;
131
	printf("CPU: ");
133
	printf("CPU: ");
132
	strncpy(cpu_model, i386_cpus[cpu].cpu_name, sizeof cpu_model);
134
	strncpy(cpu_model, i386_cpus[cpu].cpu_name, sizeof cpu_model);
Lines 205-215 Link Here
205
					cpu = CPU_PII;
207
					cpu = CPU_PII;
206
					break;
208
					break;
207
				case 0x60:
209
				case 0x60:
208
				        strcat(cpu_model, "Celeron");
210
				        strcat(cpu_model, "Pentium II/Celeron");
209
					cpu = CPU_PII;
211
					cpu = CPU_PII;
210
					break;
212
					break;
211
				case 0x70:
213
				case 0x70:
212
				        strcat(cpu_model, "Pentium III");
214
				        strcat(cpu_model, "Pentium III/Xeon");
213
					cpu = CPU_PIII;
215
					cpu = CPU_PIII;
214
					break;
216
					break;
215
				default:
217
				default:
Lines 552-583 Link Here
552
			 */
550
			 */
553
			printf("\n  Features=0x%b", cpu_feature,
551
			printf("\n  Features=0x%b", cpu_feature,
554
			"\020"
552
			"\020"
555
			"\001FPU"
553
			"\001FPU"	/* Integral FPU */
556
			"\002VME"
554
			"\002VME"	/* Extended VM86 mode support */
557
			"\003DE"
555
			"\003DE"
558
			"\004PSE"
556
			"\004PSE"	/* 4MByte page tables */
559
			"\005TSC"
557
			"\005TSC"	/* Timestamp counter */
560
			"\006MSR"
558
			"\006MSR"	/* Machine specific registers */
561
			"\007PAE"
559
			"\007PAE"	/* Physical address extension */
562
			"\010MCE"
560
			"\010MCE"	/* Machine Check support */
563
			"\011CX8"
561
			"\011CX8"	/* CMPEXCH8 instruction */
564
			"\012APIC"
562
			"\012APIC"	/* SMP local APIC */
565
			"\013oldMTRR"
563
			"\013oldMTRR"
566
			"\014SEP"
564
			"\014SEP"
567
			"\015MTRR"
565
			"\015MTRR"
568
			"\016PGE"
566
			"\016PGE"	/* PG_G (global bit) support */
569
			"\017MCA"
567
			"\017MCA"
570
			"\020CMOV"
568
			"\020CMOV"	/* CMOV instruction */
571
			"\021PAT"
569
			"\021PAT"	/* Page attributes table */
572
			"\022PSE36"
570
			"\022PSE36"	/* 36 bit address space support */
573
			"\023<b18>"
571
			"\023PN"	/* Processor Serial number */
574
			"\024<b19>"
572
			"\024<b19>"
575
			"\025<b20>"
573
			"\025<b20>"
576
			"\026<b21>"
574
			"\026<b21>"
577
			"\027<b22>"
575
			"\027<b22>"
578
			"\030MMX"
576
			"\030MMX"	/* MMX instructions */
579
			"\031FXSR"
577
			"\031FXSR"	/* FXSAVE/FXRSTOR */
580
			"\032<b25>"
578
			"\032XMM"	/* Katami SIMD/MMX2 instructions */
581
			"\033<b26>"
579
			"\033<b26>"
582
			"\034<b27>"
580
			"\034<b27>"
583
			"\035<b28>"
581
			"\035<b28>"
Lines 663-668 Link Here
663
("
661
("
664
	.text
662
	.text
665
	.p2align 2,0x90
663
	.p2align 2,0x90
664
	.type	" __XSTRING(CNAME(bluetrap6)) ",@function
666
" __XSTRING(CNAME(bluetrap6)) ":
665
" __XSTRING(CNAME(bluetrap6)) ":
667
	ss
666
	ss
668
	movl	$0xa8c1d," __XSTRING(CNAME(trap_by_rdmsr)) "
667
	movl	$0xa8c1d," __XSTRING(CNAME(trap_by_rdmsr)) "
Lines 679-684 Link Here
679
("
678
("
680
	.text
679
	.text
681
	.p2align 2,0x90
680
	.p2align 2,0x90
681
	.type " __XSTRING(CNAME(bluetrap13)) ",@function
682
" __XSTRING(CNAME(bluetrap13)) ":
682
" __XSTRING(CNAME(bluetrap13)) ":
683
	ss
683
	ss
684
	movl	$0xa89c4," __XSTRING(CNAME(trap_by_rdmsr)) "
684
	movl	$0xa89c4," __XSTRING(CNAME(trap_by_rdmsr)) "

Return to bug 14437