| 1 |
.. SPDX-License-Identifier: GPL-2.0 |
| 2 |
|
| 3 |
===================================== |
| 4 |
SRAT - Static Resource Affinity Table |
| 5 |
===================================== |
| 6 |
|
| 7 |
The System/Static Resource Affinity Table describes resource (CPU, Memory) |
| 8 |
affinity to "Proximity Domains". This table is technically optional, but for |
| 9 |
performance information (see "HMAT") to be enumerated by linux it must be |
| 10 |
present. |
| 11 |
|
| 12 |
There is a careful dance between the CEDT and SRAT tables and how NUMA nodes are |
| 13 |
created. If things don't look quite the way you expect - check the SRAT Memory |
| 14 |
Affinity entries and CEDT CFMWS to determine what your platform actually |
| 15 |
supports in terms of flexible topologies. |
| 16 |
|
| 17 |
The SRAT may statically assign portions of a CFMWS SPA range to a specific |
| 18 |
proximity domains. See linux numa creation for more information about how |
| 19 |
this presents in the NUMA topology. |
| 20 |
|
| 21 |
Proximity Domain |
| 22 |
================ |
| 23 |
A proximity domain is ROUGHLY equivalent to "NUMA Node" - though a 1-to-1 |
| 24 |
mapping is not guaranteed. There are scenarios where "Proximity Domain 4" may |
| 25 |
map to "NUMA Node 3", for example. (See "NUMA Node Creation") |
| 26 |
|
| 27 |
Memory Affinity |
| 28 |
=============== |
| 29 |
Generally speaking, if a host does any amount of CXL fabric (decoder) |
| 30 |
programming in BIOS - an SRAT entry for that memory needs to be present. |
| 31 |
|
| 32 |
Example :: |
| 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 |
|
| 47 |
Generic Port Affinity |
| 48 |
===================== |
| 49 |
The Generic Port Affinity subtable provides an association between a proximity |
| 50 |
domain and a device handle representing a Generic Port such as a CXL host |
| 51 |
bridge. With the association, latency and bandwidth numbers can be retrieved |
| 52 |
from the SRAT for the path between CPU(s) (initiator) and the Generic Port. |
| 53 |
This is used to construct performance coordinates for hotplugged CXL DEVICES, |
| 54 |
which cannot be enumerated at boot by platform firmware. |
| 55 |
|
| 56 |
Example :: |
| 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 |
|
| 67 |
The Proximity Domain is matched up to the :doc:`HMAT <hmat>` SSLBI Target |
| 68 |
Proximity Domain List for the related latency or bandwidth numbers. Those |
| 69 |
performance numbers are tied to a CXL host bridge via the Device Handle. |
| 70 |
The driver uses the association to retrieve the Generic Port performance |
| 71 |
numbers for the whole CXL path access coordinates calculation. |