| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | /* $NetBSD: i386.c,v 1.27.2.1 2012/03/05 19:12:06 sborrill Exp $ */ | | 1 | /* $NetBSD: i386.c,v 1.27.2.2 2012/03/07 23:26:01 riz Exp $ */ |
2 | | | 2 | |
3 | /*- | | 3 | /*- |
4 | * Copyright (c) 1999, 2000, 2001, 2006, 2007, 2008 The NetBSD Foundation, Inc. | | 4 | * Copyright (c) 1999, 2000, 2001, 2006, 2007, 2008 The NetBSD Foundation, Inc. |
5 | * All rights reserved. | | 5 | * All rights reserved. |
6 | * | | 6 | * |
7 | * This code is derived from software contributed to The NetBSD Foundation | | 7 | * This code is derived from software contributed to The NetBSD Foundation |
8 | * by Frank van der Linden, and by Jason R. Thorpe. | | 8 | * by Frank van der Linden, and by Jason R. Thorpe. |
9 | * | | 9 | * |
10 | * Redistribution and use in source and binary forms, with or without | | 10 | * Redistribution and use in source and binary forms, with or without |
11 | * modification, are permitted provided that the following conditions | | 11 | * modification, are permitted provided that the following conditions |
12 | * are met: | | 12 | * are met: |
13 | * 1. Redistributions of source code must retain the above copyright | | 13 | * 1. Redistributions of source code must retain the above copyright |
14 | * notice, this list of conditions and the following disclaimer. | | 14 | * notice, this list of conditions and the following disclaimer. |
| @@ -47,27 +47,27 @@ | | | @@ -47,27 +47,27 @@ |
47 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | | 47 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
48 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | | 48 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE |
49 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | | 49 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
50 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | | 50 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS |
51 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | | 51 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) |
52 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | | 52 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT |
53 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | | 53 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY |
54 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | | 54 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
55 | * SUCH DAMAGE. | | 55 | * SUCH DAMAGE. |
56 | */ | | 56 | */ |
57 | | | 57 | |
58 | #include <sys/cdefs.h> | | 58 | #include <sys/cdefs.h> |
59 | #ifndef lint | | 59 | #ifndef lint |
60 | __RCSID("$NetBSD: i386.c,v 1.27.2.1 2012/03/05 19:12:06 sborrill Exp $"); | | 60 | __RCSID("$NetBSD: i386.c,v 1.27.2.2 2012/03/07 23:26:01 riz Exp $"); |
61 | #endif /* not lint */ | | 61 | #endif /* not lint */ |
62 | | | 62 | |
63 | #include <sys/types.h> | | 63 | #include <sys/types.h> |
64 | #include <sys/param.h> | | 64 | #include <sys/param.h> |
65 | #include <sys/bitops.h> | | 65 | #include <sys/bitops.h> |
66 | #include <sys/sysctl.h> | | 66 | #include <sys/sysctl.h> |
67 | | | 67 | |
68 | #include <string.h> | | 68 | #include <string.h> |
69 | #include <stdio.h> | | 69 | #include <stdio.h> |
70 | #include <stdlib.h> | | 70 | #include <stdlib.h> |
71 | #include <err.h> | | 71 | #include <err.h> |
72 | #include <assert.h> | | 72 | #include <assert.h> |
73 | #include <math.h> | | 73 | #include <math.h> |
| @@ -1507,29 +1507,30 @@ identifycpu(const char *cpuname) | | | @@ -1507,29 +1507,30 @@ identifycpu(const char *cpuname) |
1507 | while (*bp != '\0') { | | 1507 | while (*bp != '\0') { |
1508 | aprint_verbose("%s: SVM features %s\n", | | 1508 | aprint_verbose("%s: SVM features %s\n", |
1509 | cpuname, bp); | | 1509 | cpuname, bp); |
1510 | bp += strlen(bp) + 1; | | 1510 | bp += strlen(bp) + 1; |
1511 | } | | 1511 | } |
1512 | } | | 1512 | } |
1513 | } | | 1513 | } |
1514 | | | 1514 | |
1515 | #ifdef INTEL_ONDEMAND_CLOCKMOD | | 1515 | #ifdef INTEL_ONDEMAND_CLOCKMOD |
1516 | clockmod_init(); | | 1516 | clockmod_init(); |
1517 | #endif | | 1517 | #endif |
1518 | | | 1518 | |
1519 | aprint_normal_dev(ci->ci_dev, "family %02x model %02x " | | 1519 | aprint_normal_dev(ci->ci_dev, "family %02x model %02x " |
1520 | "extfamily %02x extmodel %02x\n", CPUID2FAMILY(ci->ci_signature), | | 1520 | "extfamily %02x extmodel %02x stepping %02x\n", |
1521 | CPUID2MODEL(ci->ci_signature), CPUID2EXTFAMILY(ci->ci_signature), | | 1521 | CPUID2FAMILY(ci->ci_signature), CPUID2MODEL(ci->ci_signature), |
1522 | CPUID2EXTMODEL(ci->ci_signature)); | | 1522 | CPUID2EXTFAMILY(ci->ci_signature), CPUID2EXTMODEL(ci->ci_signature), |
| | | 1523 | CPUID2STEPPING(ci->ci_signature)); |
1523 | } | | 1524 | } |
1524 | | | 1525 | |
1525 | static const char * | | 1526 | static const char * |
1526 | print_cache_config(struct cpu_info *ci, int cache_tag, const char *name, | | 1527 | print_cache_config(struct cpu_info *ci, int cache_tag, const char *name, |
1527 | const char *sep) | | 1528 | const char *sep) |
1528 | { | | 1529 | { |
1529 | struct x86_cache_info *cai = &ci->ci_cinfo[cache_tag]; | | 1530 | struct x86_cache_info *cai = &ci->ci_cinfo[cache_tag]; |
1530 | char human_num[HUMAN_BUFSIZE]; | | 1531 | char human_num[HUMAN_BUFSIZE]; |
1531 | | | 1532 | |
1532 | if (cai->cai_totalsize == 0) | | 1533 | if (cai->cai_totalsize == 0) |
1533 | return sep; | | 1534 | return sep; |
1534 | | | 1535 | |
1535 | if (sep == NULL) | | 1536 | if (sep == NULL) |