Date: Wed, 20 Oct 1999 14:32:15 -0400 (EDT) From: kbyanc@posi.net To: FreeBSD-gnats-submit@freebsd.org Subject: i386/14437: MFC'ed identcpu.c Message-ID: <199910201832.OAA36098@kronos.alcnet.com>
next in thread | raw e-mail | index | archive | help
>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<b18>"
+ "\020CMOV" /* CMOV instruction */
+ "\021PAT" /* Page attributes table */
+ "\022PSE36" /* 36 bit address space support */
+ "\023PN" /* Processor Serial number */
"\024<b19>"
"\025<b20>"
"\026<b21>"
"\027<b22>"
- "\030MMX"
- "\031FXSR"
- "\032<b25>"
+ "\030MMX" /* MMX instructions */
+ "\031FXSR" /* FXSAVE/FXRSTOR */
+ "\032XMM" /* Katami SIMD/MMX2 instructions */
"\033<b26>"
"\034<b27>"
"\035<b28>"
@@ -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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199910201832.OAA36098>
