Deleted Added
full compact
hwpmc_intel.c (263446) hwpmc_intel.c (267062)
1/*-
2 * Copyright (c) 2008 Joseph Koshy
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 15 unchanged lines hidden (view full) ---

24 * SUCH DAMAGE.
25 */
26
27/*
28 * Common code for handling Intel CPUs.
29 */
30
31#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 2008 Joseph Koshy
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 15 unchanged lines hidden (view full) ---

24 * SUCH DAMAGE.
25 */
26
27/*
28 * Common code for handling Intel CPUs.
29 */
30
31#include <sys/cdefs.h>
32__FBSDID("$FreeBSD: head/sys/dev/hwpmc/hwpmc_intel.c 263446 2014-03-20 20:51:08Z hiren $");
32__FBSDID("$FreeBSD: head/sys/dev/hwpmc/hwpmc_intel.c 267062 2014-06-04 16:06:38Z kib $");
33
34#include <sys/param.h>
35#include <sys/pmc.h>
36#include <sys/pmckern.h>
37#include <sys/systm.h>
38
39#include <machine/cpu.h>
40#include <machine/cputypes.h>

--- 101 unchanged lines hidden (view full) ---

142 case 0x1E: /*
143 * Per Intel document 253669-032 9/2009,
144 * pages A-2 and A-57
145 */
146 case 0x1F: /*
147 * Per Intel document 253669-032 9/2009,
148 * pages A-2 and A-57
149 */
33
34#include <sys/param.h>
35#include <sys/pmc.h>
36#include <sys/pmckern.h>
37#include <sys/systm.h>
38
39#include <machine/cpu.h>
40#include <machine/cputypes.h>

--- 101 unchanged lines hidden (view full) ---

142 case 0x1E: /*
143 * Per Intel document 253669-032 9/2009,
144 * pages A-2 and A-57
145 */
146 case 0x1F: /*
147 * Per Intel document 253669-032 9/2009,
148 * pages A-2 and A-57
149 */
150 case 0x2E:
151 cputype = PMC_CPU_INTEL_COREI7;
152 nclasses = 5;
153 break;
150 cputype = PMC_CPU_INTEL_COREI7;
151 nclasses = 5;
152 break;
153 case 0x2E:
154 cputype = PMC_CPU_INTEL_NEHALEM_EX;
155 nclasses = 3;
156 break;
154 case 0x25: /* Per Intel document 253669-033US 12/2009. */
155 case 0x2C: /* Per Intel document 253669-033US 12/2009. */
156 cputype = PMC_CPU_INTEL_WESTMERE;
157 nclasses = 5;
158 break;
157 case 0x25: /* Per Intel document 253669-033US 12/2009. */
158 case 0x2C: /* Per Intel document 253669-033US 12/2009. */
159 cputype = PMC_CPU_INTEL_WESTMERE;
160 nclasses = 5;
161 break;
162 case 0x2F: /* Westmere-EX, seen in wild */
163 cputype = PMC_CPU_INTEL_WESTMERE_EX;
164 nclasses = 3;
165 break;
159 case 0x2A: /* Per Intel document 253669-039US 05/2011. */
160 cputype = PMC_CPU_INTEL_SANDYBRIDGE;
161 nclasses = 5;
162 break;
163 case 0x2D: /* Per Intel document 253669-044US 08/2012. */
164 cputype = PMC_CPU_INTEL_SANDYBRIDGE_XEON;
165 nclasses = 3;
166 break;

--- 46 unchanged lines hidden (view full) ---

213 * Intel Core, Core 2 and Atom processors.
214 */
215 case PMC_CPU_INTEL_ATOM:
216 case PMC_CPU_INTEL_ATOM_SILVERMONT:
217 case PMC_CPU_INTEL_CORE:
218 case PMC_CPU_INTEL_CORE2:
219 case PMC_CPU_INTEL_CORE2EXTREME:
220 case PMC_CPU_INTEL_COREI7:
166 case 0x2A: /* Per Intel document 253669-039US 05/2011. */
167 cputype = PMC_CPU_INTEL_SANDYBRIDGE;
168 nclasses = 5;
169 break;
170 case 0x2D: /* Per Intel document 253669-044US 08/2012. */
171 cputype = PMC_CPU_INTEL_SANDYBRIDGE_XEON;
172 nclasses = 3;
173 break;

--- 46 unchanged lines hidden (view full) ---

220 * Intel Core, Core 2 and Atom processors.
221 */
222 case PMC_CPU_INTEL_ATOM:
223 case PMC_CPU_INTEL_ATOM_SILVERMONT:
224 case PMC_CPU_INTEL_CORE:
225 case PMC_CPU_INTEL_CORE2:
226 case PMC_CPU_INTEL_CORE2EXTREME:
227 case PMC_CPU_INTEL_COREI7:
228 case PMC_CPU_INTEL_NEHALEM_EX:
221 case PMC_CPU_INTEL_IVYBRIDGE:
222 case PMC_CPU_INTEL_SANDYBRIDGE:
223 case PMC_CPU_INTEL_WESTMERE:
229 case PMC_CPU_INTEL_IVYBRIDGE:
230 case PMC_CPU_INTEL_SANDYBRIDGE:
231 case PMC_CPU_INTEL_WESTMERE:
232 case PMC_CPU_INTEL_WESTMERE_EX:
224 case PMC_CPU_INTEL_SANDYBRIDGE_XEON:
225 case PMC_CPU_INTEL_IVYBRIDGE_XEON:
226 case PMC_CPU_INTEL_HASWELL:
227 error = pmc_core_initialize(pmc_mdep, ncpus, verov);
228 break;
229
230 /*
231 * Intel Pentium 4 Processors, and P4/EMT64 processors.

--- 70 unchanged lines hidden (view full) ---

302 switch (md->pmd_cputype) {
303#if defined(__i386__) || defined(__amd64__)
304 case PMC_CPU_INTEL_ATOM:
305 case PMC_CPU_INTEL_ATOM_SILVERMONT:
306 case PMC_CPU_INTEL_CORE:
307 case PMC_CPU_INTEL_CORE2:
308 case PMC_CPU_INTEL_CORE2EXTREME:
309 case PMC_CPU_INTEL_COREI7:
233 case PMC_CPU_INTEL_SANDYBRIDGE_XEON:
234 case PMC_CPU_INTEL_IVYBRIDGE_XEON:
235 case PMC_CPU_INTEL_HASWELL:
236 error = pmc_core_initialize(pmc_mdep, ncpus, verov);
237 break;
238
239 /*
240 * Intel Pentium 4 Processors, and P4/EMT64 processors.

--- 70 unchanged lines hidden (view full) ---

311 switch (md->pmd_cputype) {
312#if defined(__i386__) || defined(__amd64__)
313 case PMC_CPU_INTEL_ATOM:
314 case PMC_CPU_INTEL_ATOM_SILVERMONT:
315 case PMC_CPU_INTEL_CORE:
316 case PMC_CPU_INTEL_CORE2:
317 case PMC_CPU_INTEL_CORE2EXTREME:
318 case PMC_CPU_INTEL_COREI7:
319 case PMC_CPU_INTEL_NEHALEM_EX:
310 case PMC_CPU_INTEL_HASWELL:
311 case PMC_CPU_INTEL_IVYBRIDGE:
312 case PMC_CPU_INTEL_SANDYBRIDGE:
313 case PMC_CPU_INTEL_WESTMERE:
320 case PMC_CPU_INTEL_HASWELL:
321 case PMC_CPU_INTEL_IVYBRIDGE:
322 case PMC_CPU_INTEL_SANDYBRIDGE:
323 case PMC_CPU_INTEL_WESTMERE:
324 case PMC_CPU_INTEL_WESTMERE_EX:
314 case PMC_CPU_INTEL_SANDYBRIDGE_XEON:
315 case PMC_CPU_INTEL_IVYBRIDGE_XEON:
316 pmc_core_finalize(md);
317 break;
318
319 case PMC_CPU_INTEL_PIV:
320 pmc_p4_finalize(md);
321 break;

--- 33 unchanged lines hidden ---
325 case PMC_CPU_INTEL_SANDYBRIDGE_XEON:
326 case PMC_CPU_INTEL_IVYBRIDGE_XEON:
327 pmc_core_finalize(md);
328 break;
329
330 case PMC_CPU_INTEL_PIV:
331 pmc_p4_finalize(md);
332 break;

--- 33 unchanged lines hidden ---