On 9/11/2025 10:07 AM, K Prateek Nayak wrote:
/*
* In case leaf B is available, use it to derive
* topology information.
* If the extended topology leaf 0xb leaf doesn't exits,
*/* derive CORE and DIE information from the 0x8000001e leaf.
err = detect_extended_topology(c);
if (!err)
c->x86_coreid_bits = get_count_order(c->x86_max_cores);
if (!has_extended_topology) {
c->cpu_die_id = ecx & 0xff;
Just noticed that we still need that "cpu_die_id" from 0x8000001e since 0xb on AMD does not implement the LEVEL_TYPE of DIE_TYPE (5).
if (c->x86 >= 0x17) {
c->cpu_core_id = ebx & 0xff;
if (smp_num_siblings > 1)
c->x86_max_cores /= smp_num_siblings;
}
}