xref: /linux/Documentation/driver-api/cxl/linux/cxl-driver.rst (revision e4478834aa09fd28abaaf774a4bcaa4bbe6804e5)
1.. SPDX-License-Identifier: GPL-2.0
2
3====================
4CXL Driver Operation
5====================
6
7The devices described in this section are present in ::
8
9  /sys/bus/cxl/devices/
10  /dev/cxl/
11
12The :code:`cxl-cli` library, maintained as part of the NDTCL project, may
13be used to script interactions with these devices.
14
15Drivers
16=======
17The CXL driver is split into a number of drivers.
18
19* cxl_core  - fundamental init interface and core object creation
20* cxl_port  - initializes root and provides port enumeration interface.
21* cxl_acpi  - initializes root decoders and interacts with ACPI data.
22* cxl_p/mem - initializes memory devices
23* cxl_pci   - uses cxl_port to enumerate the actual fabric hierarchy.
24
25Driver Devices
26==============
27Here is an example from a single-socket system with 4 host bridges. Two host
28bridges have a single memory device attached, and the devices are interleaved
29into a single memory region. The memory region has been converted to dax. ::
30
31  # ls /sys/bus/cxl/devices/
32    dax_region0  decoder3.0  decoder6.0  mem0   port3
33    decoder0.0   decoder4.0  decoder6.1  mem1   port4
34    decoder1.0   decoder5.0  endpoint5   port1  region0
35    decoder2.0   decoder5.1  endpoint6   port2  root0
36
37
38.. kernel-render:: DOT
39   :alt: Digraph of CXL fabric describing host-bridge interleaving
40   :caption: Diagraph of CXL fabric with a host-bridge interleave memory region
41
42   digraph foo {
43     "root0" -> "port1";
44     "root0" -> "port3";
45     "root0" -> "decoder0.0";
46     "port1" -> "endpoint5";
47     "port3" -> "endpoint6";
48     "port1" -> "decoder1.0";
49     "port3" -> "decoder3.0";
50     "endpoint5" -> "decoder5.0";
51     "endpoint6" -> "decoder6.0";
52     "decoder0.0" -> "region0";
53     "decoder0.0" -> "decoder1.0";
54     "decoder0.0" -> "decoder3.0";
55     "decoder1.0" -> "decoder5.0";
56     "decoder3.0" -> "decoder6.0";
57     "decoder5.0" -> "region0";
58     "decoder6.0" -> "region0";
59     "region0" -> "dax_region0";
60     "dax_region0" -> "dax0.0";
61   }
62
63For this section we'll explore the devices present in this configuration, but
64we'll explore more configurations in-depth in example configurations below.
65
66Base Devices
67------------
68Most devices in a CXL fabric are a `port` of some kind (because each
69device mostly routes request from one device to the next, rather than
70provide a direct service).
71
72Root
73~~~~
74The `CXL Root` is logical object created by the `cxl_acpi` driver during
75:code:`cxl_acpi_probe` - if the :code:`ACPI0017` `Compute Express Link
76Root Object` Device Class is found.
77
78The Root contains links to:
79
80* `Host Bridge Ports` defined by CHBS in the :doc:`CEDT<../platform/acpi/cedt>`
81
82* `Downstream Ports` typically connected to `Host Bridge Ports`.
83
84* `Root Decoders` defined by CFMWS the :doc:`CEDT<../platform/acpi/cedt>`
85
86::
87
88  # ls /sys/bus/cxl/devices/root0
89    decoder0.0          dport0  dport5    port2  subsystem
90    decoders_committed  dport1  modalias  port3  uevent
91    devtype             dport4  port1     port4  uport
92
93  # cat /sys/bus/cxl/devices/root0/devtype
94    cxl_port
95
96  # cat port1/devtype
97    cxl_port
98
99  # cat decoder0.0/devtype
100    cxl_decoder_root
101
102The root is first `logical port` in the CXL fabric, as presented by the Linux
103CXL driver.  The `CXL root` is a special type of `switch port`, in that it
104only has downstream port connections.
105
106Port
107~~~~
108A `port` object is better described as a `switch port`.  It may represent a
109host bridge to the root or an actual switch port on a switch. A `switch port`
110contains one or more decoders used to route memory requests downstream ports,
111which may be connected to another `switch port` or an `endpoint port`.
112
113::
114
115  # ls /sys/bus/cxl/devices/port1
116    decoder1.0          dport0    driver     parent_dport  uport
117    decoders_committed  dport113  endpoint5  subsystem
118    devtype             dport2    modalias   uevent
119
120  # cat devtype
121    cxl_port
122
123  # cat decoder1.0/devtype
124    cxl_decoder_switch
125
126  # cat endpoint5/devtype
127    cxl_port
128
129CXL `Host Bridges` in the fabric are probed during :code:`cxl_acpi_probe` at
130the time the `CXL Root` is probed.  The allows for the immediate logical
131connection to between the root and host bridge.
132
133* The root has a downstream port connection to a host bridge
134
135* The host bridge has an upstream port connection to the root.
136
137* The host bridge has one or more downstream port connections to switch
138  or endpoint ports.
139
140A `Host Bridge` is a special type of CXL `switch port`. It is explicitly
141defined in the ACPI specification via `ACPI0016` ID.  `Host Bridge` ports
142will be probed at `acpi_probe` time, while similar ports on an actual switch
143will be probed later.  Otherwise, switch and host bridge ports look very
144similar - the both contain switch decoders which route accesses between
145upstream and downstream ports.
146
147Endpoint
148~~~~~~~~
149An `endpoint` is a terminal port in the fabric.  This is a `logical device`,
150and may be one of many `logical devices` presented by a memory device. It
151is still considered a type of `port` in the fabric.
152
153An `endpoint` contains `endpoint decoders` and the device's Coherent Device
154Attribute Table (which describes the device's capabilities). ::
155
156  # ls /sys/bus/cxl/devices/endpoint5
157    CDAT        decoders_committed  modalias      uevent
158    decoder5.0  devtype             parent_dport  uport
159    decoder5.1  driver              subsystem
160
161  # cat /sys/bus/cxl/devices/endpoint5/devtype
162    cxl_port
163
164  # cat /sys/bus/cxl/devices/endpoint5/decoder5.0/devtype
165    cxl_decoder_endpoint
166
167
168Memory Device (memdev)
169~~~~~~~~~~~~~~~~~~~~~~
170A `memdev` is probed and added by the `cxl_pci` driver in :code:`cxl_pci_probe`
171and is managed by the `cxl_mem` driver. It primarily provides the `IOCTL`
172interface to a memory device, via :code:`/dev/cxl/memN`, and exposes various
173device configuration data. ::
174
175  # ls /sys/bus/cxl/devices/mem0
176    dev       firmware_version    payload_max  security   uevent
177    driver    label_storage_size  pmem         serial
178    firmware  numa_node           ram          subsystem
179
180A Memory Device is a discrete base object that is not a port.  While the
181physical device it belongs to may also host an `endpoint`, the relationship
182between an `endpoint` and a `memdev` is not captured in sysfs.
183
184DPA Partitions
185~~~~~~~~~~~~~~
186A memory device presents its capacity as one flat `Device Physical Address`
187(DPA) space divided into `partitions`, which Linux lays out in a fixed
188order::
189
190  DPA 0                                                     end
191  +---------------+---------------+---------------------------+
192  |      ram      |     pmem      |       dynamic_ram_1       |
193  +---------------+---------------+---------------------------+
194  part[0]         part[1]         part[2]
195
196Part of that order is required by the CXL specification and part of it is a
197Linux choice.
198
199The `ram` and `pmem` order is mandated.  CXL r4.0 section 8.2.10.9.2.1 "Get
200Partition Info" (4100h), Table 8-310, mandates that volatile capacity starts
201at DPA 0 and pmem starts at the DPA immediately following it.
202
203Dynamic Capacity partitions only need to be 256MB aligned according to
204CXL r4.0 section 8.2.10.9.9.1 "Get Dynamic Capacity Configuration"
205(opcode 4800h), Table 8-347. So a device could leave a gap between ram/pmem
206(static) capacity and its first DC partition, or between one DC partition
207and the next.
208
209Linux chooses not to support gaps between static and dynamic capacity: the
210first DC partition must begin at the DPA immediately following static
211capacity -- after pmem, after ram on a device with no pmem, or at DPA 0 on
212a device with no static capacity at all.
213
214Currently, only one dynamic partition is supported. A device may report up
215to eight (CXL r4.0 Table 8-346); Linux configures the first as its
216`dynamic_ram_1` partition. Gaps between DC partitions are not checked, since
217only the first is used.
218
219Port Relationships
220~~~~~~~~~~~~~~~~~~
221In our example described above, there are four host bridges attached to the
222root, and two of the host bridges have one endpoint attached.
223
224.. kernel-render:: DOT
225   :alt: Digraph of CXL fabric describing host-bridge interleaving
226   :caption: Diagraph of CXL fabric with a host-bridge interleave memory region
227
228   digraph foo {
229     "root0"    -> "port1";
230     "root0"    -> "port2";
231     "root0"    -> "port3";
232     "root0"    -> "port4";
233     "port1" -> "endpoint5";
234     "port3" -> "endpoint6";
235   }
236
237Decoders
238--------
239A `Decoder` is short for a CXL Host-Managed Device Memory (HDM) Decoder. It is
240a device that routes accesses through the CXL fabric to an endpoint, and at
241the endpoint translates a `Host Physical` to `Device Physical` Addressing.
242
243The CXL 3.1 specification heavily implies that only endpoint decoders should
244engage in translation of `Host Physical Address` to `Device Physical Address`.
245::
246
247  8.2.4.20 CXL HDM Decoder Capability Structure
248
249  IMPLEMENTATION NOTE
250  CXL Host Bridge and Upstream Switch Port Decode Flow
251
252  IMPLEMENTATION NOTE
253  Device Decode Logic
254
255These notes imply that there are two logical groups of decoders.
256
257* Routing Decoder - a decoder which routes accesses but does not translate
258  addresses from HPA to DPA.
259
260* Translating Decoder - a decoder which translates accesses from HPA to DPA
261  for an endpoint to service.
262
263The CXL drivers distinguish 3 decoder types: root, switch, and endpoint. Only
264endpoint decoders are Translating Decoders, all others are Routing Decoders.
265
266.. note:: PLATFORM VENDORS BE AWARE
267
268   Linux makes a strong assumption that endpoint decoders are the only decoder
269   in the fabric that actively translates HPA to DPA.  Linux assumes routing
270   decoders pass the HPA unchanged to the next decoder in the fabric.
271
272   It is therefore assumed that any given decoder in the fabric will have an
273   address range that is a subset of its upstream port decoder. Any deviation
274   from this scheme undefined per the specification.  Linux prioritizes
275   spec-defined / architectural behavior.
276
277Decoders may have one or more `Downstream Targets` if configured to interleave
278memory accesses.  This will be presented in sysfs via the :code:`target_list`
279parameter.
280
281Root Decoder
282~~~~~~~~~~~~
283A `Root Decoder` is logical construct of the physical address and interleave
284configurations present in the CFMWS field of the :doc:`CEDT
285<../platform/acpi/cedt>`.
286Linux presents this information as a decoder present in the `CXL Root`.  We
287consider this a `Root Decoder`, though technically it exists on the boundary
288of the CXL specification and platform-specific CXL root implementations.
289
290Linux considers these logical decoders a type of `Routing Decoder`, and is the
291first decoder in the CXL fabric to receive a memory access from the platform's
292memory controllers.
293
294`Root Decoders` are created during :code:`cxl_acpi_probe`.  One root decoder
295is created per CFMWS entry in the :doc:`CEDT <../platform/acpi/cedt>`.
296
297The :code:`target_list` parameter is filled by the CFMWS target fields. Targets
298of a root decoder are `Host Bridges`, which means interleave done at the root
299decoder level is an `Inter-Host-Bridge Interleave`.
300
301Only root decoders are capable of `Inter-Host-Bridge Interleave`.
302
303Such interleaves must be configured by the platform and described in the ACPI
304CEDT CFMWS, as the target CXL host bridge UIDs in the CFMWS must match the CXL
305host bridge UIDs in the CHBS field of the :doc:`CEDT
306<../platform/acpi/cedt>` and the UID field of CXL Host Bridges defined in
307the :doc:`DSDT <../platform/acpi/dsdt>`.
308
309Interleave settings in a root decoder describe how to interleave accesses among
310the *immediate downstream targets*, not the entire interleave set.
311
312The memory range described in the root decoder is used to
313
3141) Create a memory region (:code:`region0` in this example), and
315
3162) Associate the region with an IO Memory Resource (:code:`kernel/resource.c`)
317
318::
319
320  # ls /sys/bus/cxl/devices/decoder0.0/
321    cap_pmem           devtype                 region0
322    cap_ram            interleave_granularity  size
323    cap_type2          interleave_ways         start
324    cap_type3          locked                  subsystem
325    create_ram_region  modalias                target_list
326    delete_region      qos_class               uevent
327
328  # cat /sys/bus/cxl/devices/decoder0.0/region0/resource
329    0xc050000000
330
331The IO Memory Resource is created during early boot when the CFMWS region is
332identified in the EFI Memory Map or E820 table (on x86).
333
334Root decoders are defined as a separate devtype, but are also a type
335of `Switch Decoder` due to having downstream targets. ::
336
337  # cat /sys/bus/cxl/devices/decoder0.0/devtype
338    cxl_decoder_root
339
340Switch Decoder
341~~~~~~~~~~~~~~
342Any non-root, translating decoder is considered a `Switch Decoder`, and will
343present with the type :code:`cxl_decoder_switch`. Both `Host Bridge` and `CXL
344Switch` (device) decoders are of type :code:`cxl_decoder_switch`. ::
345
346  # ls /sys/bus/cxl/devices/decoder1.0/
347    devtype                 locked    size       target_list
348    interleave_granularity  modalias  start      target_type
349    interleave_ways         region    subsystem  uevent
350
351  # cat /sys/bus/cxl/devices/decoder1.0/devtype
352    cxl_decoder_switch
353
354  # cat /sys/bus/cxl/devices/decoder1.0/region
355    region0
356
357A `Switch Decoder` has associations between a region defined by a root
358decoder and downstream target ports.  Interleaving done within a switch decoder
359is a multi-downstream-port interleave (or `Intra-Host-Bridge Interleave` for
360host bridges).
361
362Interleave settings in a switch decoder describe how to interleave accesses
363among the *immediate downstream targets*, not the entire interleave set.
364
365Switch decoders are created during :code:`cxl_switch_port_probe` in the
366:code:`cxl_port` driver, and is created based on a PCI device's DVSEC
367registers.
368
369Switch decoder programming is validated during probe if the platform programs
370them during boot (See `Auto Decoders` below), or on commit if programmed at
371runtime (See `Runtime Programming` below).
372
373
374Endpoint Decoder
375~~~~~~~~~~~~~~~~
376Any decoder attached to a *terminal* point in the CXL fabric (`An Endpoint`) is
377considered an `Endpoint Decoder`. Endpoint decoders are of type
378:code:`cxl_decoder_endpoint`. ::
379
380  # ls /sys/bus/cxl/devices/decoder5.0
381    devtype                 locked    start
382    dpa_resource            modalias  subsystem
383    dpa_size                mode      target_type
384    interleave_granularity  region    uevent
385    interleave_ways         size
386
387  # cat /sys/bus/cxl/devices/decoder5.0/devtype
388    cxl_decoder_endpoint
389
390  # cat /sys/bus/cxl/devices/decoder5.0/region
391    region0
392
393An `Endpoint Decoder` has an association with a region defined by a root
394decoder and describes the device-local resource associated with this region.
395
396Unlike root and switch decoders, endpoint decoders translate `Host Physical` to
397`Device Physical` address ranges.  The interleave settings on an endpoint
398therefore describe the entire *interleave set*.
399
400`Device Physical Address` regions must be committed in-order. For example, the
401DPA region starting at 0x80000000 cannot be committed before the DPA region
402starting at 0x0.
403
404As of Linux v6.15, Linux does not support *imbalanced* interleave setups, all
405endpoints in an interleave set are expected to have the same interleave
406settings (granularity and ways must be the same).
407
408Endpoint decoders are created during :code:`cxl_endpoint_port_probe` in the
409:code:`cxl_port` driver, and is created based on a PCI device's DVSEC registers.
410
411Decoder Relationships
412~~~~~~~~~~~~~~~~~~~~~
413In our example described above, there is one root decoder which routes memory
414accesses over two host bridges.  Each host bridge has a decoder which routes
415access to their singular endpoint targets.  Each endpoint has a decoder which
416translates HPA to DPA and services the memory request.
417
418The driver validates relationships between ports by decoder programming, so
419we can think of decoders being related in a similarly hierarchical fashion to
420ports.
421
422.. kernel-render:: DOT
423   :alt: Digraph of hierarchical relationship between root, switch, and endpoint decoders.
424   :caption: Diagraph of CXL root, switch, and endpoint decoders.
425
426   digraph foo {
427     "root0"    -> "decoder0.0";
428     "decoder0.0" -> "decoder1.0";
429     "decoder0.0" -> "decoder3.0";
430     "decoder1.0" -> "decoder5.0";
431     "decoder3.0" -> "decoder6.0";
432   }
433
434Regions
435-------
436
437Memory Region
438~~~~~~~~~~~~~
439A `Memory Region` is a logical construct that connects a set of CXL ports in
440the fabric to an IO Memory Resource.  It is ultimately used to expose the memory
441on these devices to the DAX subsystem via a `DAX Region`.
442
443An example RAM region: ::
444
445  # ls /sys/bus/cxl/devices/region0/
446    access0      devtype                 modalias  subsystem  uuid
447    access1      driver                  mode      target0
448    commit       interleave_granularity  resource  target1
449    dax_region0  interleave_ways         size      uevent
450
451A memory region can be constructed during endpoint probe, if decoders were
452programmed by BIOS/EFI (see `Auto Decoders`), or by creating a region manually
453via a `Root Decoder`'s :code:`create_ram_region` or :code:`create_pmem_region`
454interfaces.
455
456The interleave settings in a `Memory Region` describe the configuration of the
457`Interleave Set` - and are what can be expected to be seen in the endpoint
458interleave settings.
459
460.. kernel-render:: DOT
461   :alt: Digraph of CXL memory region relationships between root and endpoint decoders.
462   :caption: Regions are created based on root decoder configurations. Endpoint decoders
463             must be programmed with the same interleave settings as the region.
464
465   digraph foo {
466     "root0"    -> "decoder0.0";
467     "decoder0.0" -> "region0";
468     "region0" -> "decoder5.0";
469     "region0" -> "decoder6.0";
470   }
471
472DAX Region
473~~~~~~~~~~
474A `DAX Region` is used to convert a CXL `Memory Region` to a DAX device. A
475DAX device may then be accessed directly via a file descriptor interface, or
476converted to System RAM via the DAX kmem driver.  See the DAX driver section
477for more details. ::
478
479  # ls /sys/bus/cxl/devices/dax_region0/
480    dax0.0      devtype  modalias   uevent
481    dax_region  driver   subsystem
482
483Mailbox Interfaces
484------------------
485A mailbox command interface for each device is exposed in ::
486
487  /dev/cxl/mem0
488  /dev/cxl/mem1
489
490These mailboxes may receive any specification-defined command. Raw commands
491(custom commands) can only be sent to these interfaces if the build config
492:code:`CXL_MEM_RAW_COMMANDS` is set.  This is considered a debug and/or
493development interface, not an officially supported mechanism for creation
494of vendor-specific commands (see the `fwctl` subsystem for that).
495
496Decoder Programming
497===================
498
499Runtime Programming
500-------------------
501During probe, the only decoders *required* to be programmed are `Root Decoders`.
502In reality, `Root Decoders` are a logical construct to describe the memory
503region and interleave configuration at the host bridge level - as described
504in the ACPI CEDT CFMWS.
505
506All other `Switch` and `Endpoint` decoders may be programmed by the user
507at runtime - if the platform supports such configurations.
508
509This interaction is what creates a `Software Defined Memory` environment.
510
511See the :code:`cxl-cli` documentation for more information about how to
512configure CXL decoders at runtime.
513
514Auto Decoders
515-------------
516Auto Decoders are decoders programmed by BIOS/EFI at boot time, and are
517almost always locked (cannot be changed).  This is done by a platform
518which may have a static configuration - or certain quirks which may prevent
519dynamic runtime changes to the decoders (such as requiring additional
520controller programming within the CPU complex outside the scope of CXL).
521
522Auto Decoders are probed automatically as long as the devices and memory
523regions they are associated with probe without issue.  When probing Auto
524Decoders, the driver's primary responsibility is to ensure the fabric is
525sane - as-if validating runtime programmed regions and decoders.
526
527If Linux cannot validate auto-decoder configuration, the memory will not
528be surfaced as a DAX device - and therefore not be exposed to the page
529allocator - effectively stranding it.
530
531Interleave
532----------
533
534The Linux CXL driver supports `Cross-Link First` interleave. This dictates
535how interleave is programmed at each decoder step, as the driver validates
536the relationships between a decoder and it's parent.
537
538For example, in a `Cross-Link First` interleave setup with 16 endpoints
539attached to 4 host bridges, linux expects the following ways/granularity
540across the root, host bridge, and endpoints respectively.
541
542.. flat-table:: 4x4 cross-link first interleave settings
543
544  * - decoder
545    - ways
546    - granularity
547
548  * - root
549    - 4
550    - 256
551
552  * - host bridge
553    - 4
554    - 1024
555
556  * - endpoint
557    - 16
558    - 256
559
560At the root, every a given access will be routed to the
561:code:`((HPA / 256) % 4)th` target host bridge. Within a host bridge, every
562:code:`((HPA / 1024) % 4)th` target endpoint.  Each endpoint translates based
563on the entire 16 device interleave set.
564
565Unbalanced interleave sets are not supported - decoders at a similar point
566in the hierarchy (e.g. all host bridge decoders) must have the same ways and
567granularity configuration.
568
569At Root
570~~~~~~~
571Root decoder interleave is defined by CFMWS field of the :doc:`CEDT
572<../platform/acpi/cedt>`.  The CEDT may actually define multiple CFMWS
573configurations to describe the same physical capacity, with the intent to allow
574users to decide at runtime whether to online memory as interleaved or
575non-interleaved. ::
576
577             Subtable Type : 01 [CXL Fixed Memory Window Structure]
578       Window base address : 0000000100000000
579               Window size : 0000000100000000
580  Interleave Members (2^n) : 00
581     Interleave Arithmetic : 00
582              First Target : 00000007
583
584             Subtable Type : 01 [CXL Fixed Memory Window Structure]
585       Window base address : 0000000200000000
586               Window size : 0000000100000000
587  Interleave Members (2^n) : 00
588     Interleave Arithmetic : 00
589              First Target : 00000006
590
591             Subtable Type : 01 [CXL Fixed Memory Window Structure]
592       Window base address : 0000000300000000
593               Window size : 0000000200000000
594  Interleave Members (2^n) : 01
595     Interleave Arithmetic : 00
596              First Target : 00000007
597               Next Target : 00000006
598
599In this example, the CFMWS defines two discrete non-interleaved 4GB regions
600for each host bridge, and one interleaved 8GB region that targets both. This
601would result in 3 root decoders presenting in the root. ::
602
603  # ls /sys/bus/cxl/devices/root0/decoder*
604    decoder0.0  decoder0.1  decoder0.2
605
606  # cat /sys/bus/cxl/devices/decoder0.0/target_list start size
607    7
608    0x100000000
609    0x100000000
610
611  # cat /sys/bus/cxl/devices/decoder0.1/target_list start size
612    6
613    0x200000000
614    0x100000000
615
616  # cat /sys/bus/cxl/devices/decoder0.2/target_list start size
617    7,6
618    0x300000000
619    0x200000000
620
621These decoders are not runtime programmable.  They are used to generate a
622`Memory Region` to bring this memory online with runtime programmed settings
623at the `Switch` and `Endpoint` decoders.
624
625At Host Bridge or Switch
626~~~~~~~~~~~~~~~~~~~~~~~~
627`Host Bridge` and `Switch` decoders are programmable via the following fields:
628
629- :code:`start` - the HPA region associated with the memory region
630- :code:`size` - the size of the region
631- :code:`target_list` - the list of downstream ports
632- :code:`interleave_ways` - the number downstream ports to interleave across
633- :code:`interleave_granularity` - the granularity to interleave at.
634
635Linux expects the :code:`interleave_granularity` of switch decoders to be
636derived from their upstream port connections. In `Cross-Link First` interleave
637configurations, the :code:`interleave_granularity` of a decoder is equal to
638:code:`parent_interleave_granularity * parent_interleave_ways`.
639
640At Endpoint
641~~~~~~~~~~~
642`Endpoint Decoders` are programmed similar to Host Bridge and Switch decoders,
643with the exception that the ways and granularity are defined by the interleave
644set (e.g. the interleave settings defined by the associated `Memory Region`).
645
646- :code:`start` - the HPA region associated with the memory region
647- :code:`size` - the size of the region
648- :code:`interleave_ways` - the number endpoints in the interleave set
649- :code:`interleave_granularity` - the granularity to interleave at.
650
651These settings are used by endpoint decoders to *Translate* memory requests
652from HPA to DPA.  This is why they must be aware of the entire interleave set.
653
654Linux does not support unbalanced interleave configurations.  As a result, all
655endpoints in an interleave set must have the same ways and granularity.
656
657Example Configurations
658======================
659.. toctree::
660   :maxdepth: 1
661
662   example-configurations/single-device.rst
663   example-configurations/hb-interleave.rst
664   example-configurations/intra-hb-interleave.rst
665   example-configurations/multi-interleave.rst
666