Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/xen/i386 sync with arch/i386/i386/identcpu.c:
details: https://anonhg.NetBSD.org/src/rev/82da0e2ce456
branches: trunk
changeset: 565395:82da0e2ce456
user: cl <cl%NetBSD.org@localhost>
date: Tue Apr 06 16:20:29 2004 +0000
description:
sync with arch/i386/i386/identcpu.c:
1.9/kim
AMD CPUID 0x6a0 is an Athlon XP processor model 10, revision A2.
http://www.amd.com/us-en/assets/content_type/white_papers_and_tech_docs/27532.pdf
1.10/minoura
Print better names for Pentium4-class processors (Xeon, Celeron, etc).
1.11/mrg
- fix i386_intel_brand[]: it was missing a empty reserved entry at 0xD
causing Mobile Pentium 4 to be shown as a Mobile Celeron.
- fix intel_family6_name() for brand=0xB && signature >= 0xF13
- fix a potential out-of-bounds array reference
diffstat:
sys/arch/xen/i386/identcpu.c | 38 ++++++++++++++++++++++++++------------
1 files changed, 26 insertions(+), 12 deletions(-)
diffs (83 lines):
diff -r 73fdcd38e578 -r 82da0e2ce456 sys/arch/xen/i386/identcpu.c
--- a/sys/arch/xen/i386/identcpu.c Tue Apr 06 16:04:09 2004 +0000
+++ b/sys/arch/xen/i386/identcpu.c Tue Apr 06 16:20:29 2004 +0000
@@ -1,5 +1,5 @@
-/* $NetBSD: identcpu.c,v 1.1 2004/03/11 21:44:08 cl Exp $ */
-/* NetBSD: identcpu.c,v 1.8 2003/11/20 13:30:29 fvdl Exp */
+/* $NetBSD: identcpu.c,v 1.2 2004/04/06 16:20:29 cl Exp $ */
+/* NetBSD: identcpu.c,v 1.11 2004/04/05 02:09:41 mrg Exp */
/*-
* Copyright (c) 1999, 2000, 2001 The NetBSD Foundation, Inc.
@@ -38,7 +38,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: identcpu.c,v 1.1 2004/03/11 21:44:08 cl Exp $");
+__KERNEL_RCSID(0, "$NetBSD: identcpu.c,v 1.2 2004/04/06 16:20:29 cl Exp $");
#include "opt_cputype.h"
@@ -110,6 +110,7 @@
"Celeron", /* Intel (R) Celeron (TM) processor */
"Xeon", /* Intel (R) Xeon (TM) processor */
"Xeon MP", /* Intel (R) Xeon (TM) processor MP */
+ "", /* Reserved */
"Mobile Pentium 4", /* Mobile Intel (R) Pentium (R) 4 processor-M */
"Mobile Celeron", /* Mobile Intel (R) Celeron (R) processor */
};
@@ -298,8 +299,8 @@
{
0, "Athlon Model 1", "Athlon Model 2",
"Duron", "Athlon Model 4 (Thunderbird)",
- 0, "Athlon", "Duron", "Athlon", 0, 0, 0,
- 0, 0, 0, 0,
+ 0, "Athlon", "Duron", "Athlon", 0,
+ "Athlon", 0, 0, 0, 0, 0,
"K7 (Athlon)" /* Default */
},
NULL,
@@ -661,11 +662,15 @@
if (ci->ci_signature == 0x6B1)
ret = "Celeron";
break;
- case 0x08:
+ case 0x8:
if (ci->ci_signature >= 0xF13)
ret = "genuine processor";
break;
- case 0x0E:
+ case 0xB:
+ if (ci->ci_signature >= 0xF13)
+ ret = "Xeon MP";
+ break;
+ case 0xE:
if (ci->ci_signature < 0xF13)
ret = "Xeon";
break;
@@ -1113,11 +1118,20 @@
ci->cpu_setup = cpufam->cpu_setup;
ci->ci_info = cpufam->cpu_info;
- if (vendor == CPUVENDOR_INTEL && family == 6 &&
- model >= 5) {
- const char *tmp = intel_family6_name(ci);
- if (tmp != NULL)
- name = tmp;
+ if (vendor == CPUVENDOR_INTEL) {
+ if (family == 6 && model >= 5) {
+ const char *tmp;
+ tmp = intel_family6_name(ci);
+ if (tmp != NULL)
+ name = tmp;
+ }
+ if (family == CPU_MAXFAMILY &&
+ ci->ci_brand_id <
+ (sizeof(i386_intel_brand) /
+ sizeof(i386_intel_brand[0])) &&
+ i386_intel_brand[ci->ci_brand_id])
+ name =
+ i386_intel_brand[ci->ci_brand_id];
}
if (vendor == CPUVENDOR_AMD && family == 6 &&
Home |
Main Index |
Thread Index |
Old Index