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

Vol. 3A 7-37
MULTIPLE-PROCESSOR MANAGEMENT
The decomposition of an initial APIC_ID may consist of 4 sub fields, matching 4 levels
of hierarchy:
Cluster — Some multi-threading environments consists of multiple clusters of
multi-processor systems. The CLUSTER_ID sub-field distinguishes different
clusters. For non-clustered systems, CLUSTER_ID is usually 0.
Package — A multi-processor system consists of two or more sockets, each
mates with a physical processor package. The PACKAGE_ID sub-field distin-
guishes different physical packages within a cluster.
Core — A physical processor package consists of one or more processor cores.
The CORE_ID sub-field distinguishes processor cores in a package. For a single-
core processor, the width of this bit field is 0.
SMT — A processor core provides one or more logical processors sharing
execution resources. The SMT_ID sub-field distinguishes logical processors in a
core. The width of this bit field is non-zero if a processor core provides more than
one logical processors.
SMT and CORE sub-fields are bit-wise contiguous in the 8-bit APIC_ID field (see
Figure 7-5). The width of each sub-field depends on hardware and software configu-
rations. Field widths can be determined at runtime using the algorithm discussed
below (Example 7-1 through Example 7-3). Figure 7-6 depicts the relationships of
three of the hierarchical sub-fields in a hypothetical MP system.
The value of valid APIC_IDs need not be contiguous across package boundary or core
boundaries.
7.10.2 Identifying Logical Processors in an MP System
For Intel 64 and IA-32 processors, system hardware establishes an initial APIC ID
that is unique for each logical processor following power-up or RESET (see Section
7.7.1). Each logical processor on the system is allocated an initial APIC ID. BIOS may
implement features that tell the OS to support less than the total number of logical
processors on the system bus. Those logical processors that are not available to
applications at runtime are halted during the OS boot process. As a result, the
number valid local APIC_IDs that can be queried by affinitizing-current-thread-
Figure 7-5. Generalized Four level Interpretation of the initial APIC ID
0
Package ID
SMT ID
7
Cluster ID
Reserved
Core ID