1.. SPDX-License-Identifier: GPL-2.0 2 3===================================== 4SRAT - Static Resource Affinity Table 5===================================== 6 7The System/Static Resource Affinity Table describes resource (CPU, Memory) 8affinity to "Proximity Domains". This table is technically optional, but for 9performance information (see "HMAT") to be enumerated by linux it must be 10present. 11 12There is a careful dance between the CEDT and SRAT tables and how NUMA nodes are 13created. If things don't look quite the way you expect - check the SRAT Memory 14Affinity entries and CEDT CFMWS to determine what your platform actually 15supports in terms of flexible topologies. 16 17The SRAT may statically assign portions of a CFMWS SPA range to a specific 18proximity domains. See linux numa creation for more information about how 19this presents in the NUMA topology. 20 21Proximity Domain 22================ 23A proximity domain is ROUGHLY equivalent to "NUMA Node" - though a 1-to-1 24mapping is not guaranteed. There are scenarios where "Proximity Domain 4" may 25map to "NUMA Node 3", for example. (See "NUMA Node Creation") 26 27Memory Affinity 28=============== 29Generally speaking, if a host does any amount of CXL fabric (decoder) 30programming in BIOS - an SRAT entry for that memory needs to be present. 31 32Example :: 33 34 Subtable Type : 01 [Memory Affinity] 35 Length : 28 36 Proximity Domain : 00000001 <- NUMA Node 1 37 Reserved1 : 0000 38 Base Address : 000000C050000000 <- Physical Memory Region 39 Address Length : 0000003CA0000000 40 Reserved2 : 00000000 41 Flags (decoded below) : 0000000B 42 Enabled : 1 43 Hot Pluggable : 1 44 Non-Volatile : 0 45 46 47Generic Port Affinity 48===================== 49The Generic Port Affinity subtable provides an association between a proximity 50domain and a device handle representing a Generic Port such as a CXL host 51bridge. With the association, latency and bandwidth numbers can be retrieved 52from the SRAT for the path between CPU(s) (initiator) and the Generic Port. 53This is used to construct performance coordinates for hotplugged CXL DEVICES, 54which cannot be enumerated at boot by platform firmware. 55 56Example :: 57 58 Subtable Type : 06 [Generic Port Affinity] 59 Length : 20 <- 32d, length of table 60 Reserved : 00 61 Device Handle Type : 00 <- 0 - ACPI, 1 - PCI 62 Proximity Domain : 00000001 63 Device Handle : ACPI0016:01 64 Flags : 00000001 <- Bit 0 (Enabled) 65 Reserved : 00000000 66 67The Proximity Domain is matched up to the :doc:`HMAT <hmat>` SSLBI Target 68Proximity Domain List for the related latency or bandwidth numbers. Those 69performance numbers are tied to a CXL host bridge via the Device Handle. 70The driver uses the association to retrieve the Generic Port performance 71numbers for the whole CXL path access coordinates calculation. 72