From owner-freebsd-bugs Wed Oct 20 11:40: 5 1999 Delivered-To: freebsd-bugs@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (Postfix) with ESMTP id 4DC5014CBE for ; Wed, 20 Oct 1999 11:40:01 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.9.3/8.9.2) id LAA94549; Wed, 20 Oct 1999 11:40:01 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from kronos.alcnet.com (kronos.alcnet.com [63.69.28.22]) by hub.freebsd.org (Postfix) with ESMTP id E580014CA4 for ; Wed, 20 Oct 1999 11:32:16 -0700 (PDT) (envelope-from kbyanc@kronos.alcnet.com) Received: (from kbyanc@localhost) by kronos.alcnet.com (8.9.3/8.9.3/antispam) id OAA36098; Wed, 20 Oct 1999 14:32:15 -0400 (EDT) Message-Id: <199910201832.OAA36098@kronos.alcnet.com> Date: Wed, 20 Oct 1999 14:32:15 -0400 (EDT) From: kbyanc@posi.net Reply-To: kbyanc@posi.net To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.2 Subject: i386/14437: MFC'ed identcpu.c Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >Number: 14437 >Category: i386 >Synopsis: MFC'ed identcpu.c >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Wed Oct 20 11:40:00 PDT 1999 >Closed-Date: >Last-Modified: >Originator: Kelly Yancey >Release: FreeBSD 3.2-STABLE i386 >Organization: >Environment: -stable sources cvsuped 10/20/1999 >Description: identcpu.c in -stable is pretty out-of-sync with -current (mainly missing some CPUID bit definitions) Attached is a patch to -stable which (almost) brings it into sync with -current's identcpu.c. Specially, I left 2 sections of code which depended on not building a SMP kernel. I was not sure if the code relied on changes to -current's SMP implemention. >How-To-Repeat: >Fix: --- identcpu.c.orig Wed Oct 20 13:43:39 1999 +++ identcpu.c Wed Oct 20 14:27:09 1999 @@ -79,10 +79,12 @@ u_int cyrix_did; /* Device ID of Cyrix CPU */ int cpu_class = CPUCLASS_386; /* least common denominator */ char machine[] = "i386"; -SYSCTL_STRING(_hw, HW_MACHINE, machine, CTLFLAG_RD, machine, 0, ""); +SYSCTL_STRING(_hw, HW_MACHINE, machine, CTLFLAG_RD, + machine, 0, "Machine class"); static char cpu_model[128]; -SYSCTL_STRING(_hw, HW_MODEL, model, CTLFLAG_RD, cpu_model, 0, ""); +SYSCTL_STRING(_hw, HW_MODEL, model, CTLFLAG_RD, + cpu_model, 0, "Machine model"); static struct cpu_nameclass i386_cpus[] = { { "Intel 80286", CPUCLASS_286 }, /* CPU_286 */ @@ -126,7 +128,7 @@ printcpuinfo(void) { - u_int regs[4], nreg; + u_int regs[4], nreg = 0; cpu_class = i386_cpus[cpu].cpu_class; printf("CPU: "); strncpy(cpu_model, i386_cpus[cpu].cpu_name, sizeof cpu_model); @@ -205,11 +207,11 @@ cpu = CPU_PII; break; case 0x60: - strcat(cpu_model, "Celeron"); + strcat(cpu_model, "Pentium II/Celeron"); cpu = CPU_PII; break; case 0x70: - strcat(cpu_model, "Pentium III"); + strcat(cpu_model, "Pentium III/Xeon"); cpu = CPU_PIII; break; default: @@ -552,32 +550,32 @@ */ printf("\n Features=0x%b", cpu_feature, "\020" - "\001FPU" - "\002VME" + "\001FPU" /* Integral FPU */ + "\002VME" /* Extended VM86 mode support */ "\003DE" - "\004PSE" - "\005TSC" - "\006MSR" - "\007PAE" - "\010MCE" - "\011CX8" - "\012APIC" + "\004PSE" /* 4MByte page tables */ + "\005TSC" /* Timestamp counter */ + "\006MSR" /* Machine specific registers */ + "\007PAE" /* Physical address extension */ + "\010MCE" /* Machine Check support */ + "\011CX8" /* CMPEXCH8 instruction */ + "\012APIC" /* SMP local APIC */ "\013oldMTRR" "\014SEP" "\015MTRR" - "\016PGE" + "\016PGE" /* PG_G (global bit) support */ "\017MCA" - "\020CMOV" - "\021PAT" - "\022PSE36" - "\023" + "\020CMOV" /* CMOV instruction */ + "\021PAT" /* Page attributes table */ + "\022PSE36" /* 36 bit address space support */ + "\023PN" /* Processor Serial number */ "\024" "\025" "\026" "\027" - "\030MMX" - "\031FXSR" - "\032" + "\030MMX" /* MMX instructions */ + "\031FXSR" /* FXSAVE/FXRSTOR */ + "\032XMM" /* Katami SIMD/MMX2 instructions */ "\033" "\034" "\035" @@ -663,6 +661,7 @@ (" .text .p2align 2,0x90 + .type " __XSTRING(CNAME(bluetrap6)) ",@function " __XSTRING(CNAME(bluetrap6)) ": ss movl $0xa8c1d," __XSTRING(CNAME(trap_by_rdmsr)) " @@ -679,6 +678,7 @@ (" .text .p2align 2,0x90 + .type " __XSTRING(CNAME(bluetrap13)) ",@function " __XSTRING(CNAME(bluetrap13)) ": ss movl $0xa89c4," __XSTRING(CNAME(trap_by_rdmsr)) " >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message