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

Table Of Contents
Vol. 3 18-17
DEBUGGING AND PERFORMANCE MONITORING
18.5.2 LBR Stack
The last branch record stack and top-of-stack (TOS) pointer MSRs are supported
across Intel Core 2, Intel Xeon and Intel Atom processor families. However, the
number of MSRs in the LBR stack and the valid range of TOS pointer value can vary
between different processor families. Table 18-3 lists the LBR stack size and TOS
pointer range for several processor families according to the CPUID signatures of
DisplayFamily/DisplayModel encoding (see CPUID instruction in Chapter 3 of Intel®
64 and IA-32 Architectures Software Developer’s Manual, Volume 2A).
Last Branch Record (LBR) Stack — The LBR consists of N pairs of MSRs (N is
listed in the LBR stack size column of Table 18-3) that store source and
destination address of recent branches (see Figure 18-4):
MSR_LASTBRANCH_0_FROM_IP (address 40H) through
MSR_LASTBRANCH_(N-1)_FROM_IP (address 40H + N-1) stores source
addresses
MSR_LASTBRANCH_0_TO_IP (address 60H) through MSR_LASTBRANCH_(N-
1)_To_IP (address 60H + N-1) stores destination addresses.
Table 18-3. LBR Stack Size and TOS Pointer Range
DisplayFamily_DisplayModel Size of LBR Stack Range of TOS Pointer
06_1AH 16 0 to 15
06_17H, 06_1DH 40 to 3
06_0FH 40 to 3
06_1CH 80 to 7
Figure 18-4. 64-bit Address Layout of LBR MSR
63
Source Address
0
0
63
Destination Address
MSR_LASTBRANCH_0_FROM_IP through MSR_LASTBRANCH_(N-1)_FROM_IP
MSR_LASTBRANCH_0_TO_IP through MSR_LASTBRANCH_(N-1)_TO_IP