Intel 64 and IA-32 Architectures Software Developers Manual Volume 3B, System Programming Guide Part 2

Table Of Contents
18-50 Vol. 3
DEBUGGING AND PERFORMANCE MONITORING
IA32_PERF_GLOBAL_CTRL allows software to enable/disable event counting
of all or any combination of fixed-function PMCs (IA32_FIXED_CTRx) or any
general-purpose PMCs via a single WRMSR.
IA32_PERF_GLOBAL_STATUS allows software to query counter overflow
conditions on any combination of fixed-function PMCs or general-purpose
PMCs via a single RDMSR.
IA32_PERF_GLOBAL_OVF_CTRL allows software to clear counter overflow
conditions on any combination of fixed-function PMCs or general-purpose
PMCs via a single WRMSR.
18.13.2.1 Architectural Performance Monitoring Version 2 Facilities
The facilities provided by architectural performance monitoring version 2 can be
queried from CPUID leaf 0AH by examining the content of register EDX:
Bits 0 through 4 of CPUID.0AH.EDX indicates the number of fixed-function
performance counters available per core,
Bits 5 through 12 of CPUID.0AH.EDX indicates the bit-width of fixed-function
performance counters. Bits beyond the width of the fixed-function counter are
reserved and must be written as zeros.
NOTE
Early generation of processors based on Intel Core microarchitecture
may report in CPUID.0AH:EDX of support for version 2 but indicating
incorrect information of version 2 facilities.
The IA32_FIXED_CTR_CTRL MSR include multiple sets of 4-bit field, each 4 bit
field controls the operation of a fixed-function performance counter. Figure 18-14
shows the layout of 4-bit controls for each fixed-function PMC. Two sub-fields are
currently defined within each control. The definitions of the bit fields are:
Figure 18-14. Layout of IA32_FIXED_CTR_CTRL MSR
Cntr2 — Controls for IA32_FIXED_CTR2
Cntr1 — Controls for IA32_FIXED_CTR1
PMI — Enable PMI on overflow
Cntr0 — Controls for IA32_FIXED_CTR0
87 0
ENABLE — 0: disable; 1: OS; 2: User; 3: All ring levels
E
N
P
M
I
11 312 1
Reserved
63
2
E
N
E
N
495
P
P
M
M
I
I