System Topology Enumeration Using CPUID Extended Topology Leaf

The algorithm of system topology enumeration can be summarized as three phase of operation:
Derive “mask width” constants that will be used to extract each Sub IDs.
Gather the unique APIC IDs of each logical processor in the system, and extract/decompose each APIC ID into three sets of Sub IDs.
Analyze the relationship of hierarchical Sub IDs to establish mapping tables between...