Re: [PATCH v3 1/7] x86/cpu/hygon: Adjust the die_id and logical_die_id for Hygon models 0x4 through 0x8

From: Fu Hao

Date: Tue Jun 16 2026 - 22:39:53 EST


On 6/16/2026 11:25 PM, Dave Hansen wrote:
On 6/16/26 00:18, Fu Hao wrote:
1. On AMD, this function retrieves amd_node_id, which is an AMD-specific
Node ID. We suspect this is kept for CDD compatibility, but its
semantics differ from Hygon's requirements.

What are those requirements?

We need to accurately obtain both the physical die ID and the logical
die ID. It is important to note that physical die IDs may be non-
contiguous​ in multi-socket interconnect products.

In Hygon CPU design, the NodeId field of CPUID leaf 0x8000001e (ECX)
is now fixed to represent the socket ID and die ID, allocated as 4 bits
each: socket ID = NodeId[7:4], die ID = NodeId[3:0].
This format diverges from AMD's definition of the same leaf. Since the
bit allocation differs, we cannot reuse AMD's parsing logic.

--
Regards,
Fu Hao