Deleted Added
full compact
hwpmc_amd.h (147191) hwpmc_amd.h (184802)
1/*-
2 * Copyright (c) 2005, 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

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

18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 *
1/*-
2 * Copyright (c) 2005, 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

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

18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 *
26 * $FreeBSD: head/sys/dev/hwpmc/hwpmc_amd.h 147191 2005-06-09 19:45:09Z jkoshy $
26 * $FreeBSD: head/sys/dev/hwpmc/hwpmc_amd.h 184802 2008-11-09 17:37:54Z jkoshy $
27 */
28
29/* Machine dependent interfaces */
30
31#ifndef _DEV_HWPMC_AMD_H_
32#define _DEV_HWPMC_AMD_H_ 1
33
34/* AMD K7 and K8 PMCs */

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

39#define AMD_PMC_EVSEL_3 0xC0010003
40
41#define AMD_PMC_PERFCTR_0 0xC0010004
42#define AMD_PMC_PERFCTR_1 0xC0010005
43#define AMD_PMC_PERFCTR_2 0xC0010006
44#define AMD_PMC_PERFCTR_3 0xC0010007
45
46
27 */
28
29/* Machine dependent interfaces */
30
31#ifndef _DEV_HWPMC_AMD_H_
32#define _DEV_HWPMC_AMD_H_ 1
33
34/* AMD K7 and K8 PMCs */

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

39#define AMD_PMC_EVSEL_3 0xC0010003
40
41#define AMD_PMC_PERFCTR_0 0xC0010004
42#define AMD_PMC_PERFCTR_1 0xC0010005
43#define AMD_PMC_PERFCTR_2 0xC0010006
44#define AMD_PMC_PERFCTR_3 0xC0010007
45
46
47#define AMD_NPMCS 5 /* 1 TSC + 4 PMCs */
47#define AMD_NPMCS 4
48
49#define AMD_PMC_COUNTERMASK 0xFF000000
50#define AMD_PMC_TO_COUNTER(x) (((x) << 24) & AMD_PMC_COUNTERMASK)
51#define AMD_PMC_INVERT (1 << 23)
52#define AMD_PMC_ENABLE (1 << 22)
53#define AMD_PMC_INT (1 << 20)
54#define AMD_PMC_PC (1 << 19)
55#define AMD_PMC_EDGE (1 << 18)

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

88
89#ifdef _KERNEL
90
91/* MD extension for 'struct pmc' */
92struct pmc_md_amd_pmc {
93 uint32_t pm_amd_evsel;
94};
95
48
49#define AMD_PMC_COUNTERMASK 0xFF000000
50#define AMD_PMC_TO_COUNTER(x) (((x) << 24) & AMD_PMC_COUNTERMASK)
51#define AMD_PMC_INVERT (1 << 23)
52#define AMD_PMC_ENABLE (1 << 22)
53#define AMD_PMC_INT (1 << 20)
54#define AMD_PMC_PC (1 << 19)
55#define AMD_PMC_EDGE (1 << 18)

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

88
89#ifdef _KERNEL
90
91/* MD extension for 'struct pmc' */
92struct pmc_md_amd_pmc {
93 uint32_t pm_amd_evsel;
94};
95
96/*
97 * Prototypes
98 */
99
100struct pmc_mdep *pmc_amd_initialize(void); /* AMD K7/K8 PMCs */
101
102#endif /* _KERNEL */
103#endif /* _DEV_HWPMC_AMD_H_ */
96#endif /* _KERNEL */
97#endif /* _DEV_HWPMC_AMD_H_ */