xref: /linux/Documentation/ABI/testing/sysfs-bus-cxl (revision 6e099264185d05f50400ea494f5029264a4fe995)
18dd2bc0fSBen WidawskyWhat:		/sys/bus/cxl/flush
28dd2bc0fSBen WidawskyDate:		Januarry, 2022
38dd2bc0fSBen WidawskyKernelVersion:	v5.18
48dd2bc0fSBen WidawskyContact:	linux-cxl@vger.kernel.org
58dd2bc0fSBen WidawskyDescription:
68dd2bc0fSBen Widawsky		(WO) If userspace manually unbinds a port the kernel schedules
78dd2bc0fSBen Widawsky		all descendant memdevs for unbind. Writing '1' to this attribute
88dd2bc0fSBen Widawsky		flushes that work.
98dd2bc0fSBen Widawsky
106b625b2bSDan Williams
11b39cb105SDan WilliamsWhat:		/sys/bus/cxl/devices/memX/firmware_version
12b39cb105SDan WilliamsDate:		December, 2020
13b39cb105SDan WilliamsKernelVersion:	v5.12
14b39cb105SDan WilliamsContact:	linux-cxl@vger.kernel.org
15b39cb105SDan WilliamsDescription:
16b39cb105SDan Williams		(RO) "FW Revision" string as reported by the Identify
17b39cb105SDan Williams		Memory Device Output Payload in the CXL-2.0
18b39cb105SDan Williams		specification.
19b39cb105SDan Williams
206b625b2bSDan Williams
21b39cb105SDan WilliamsWhat:		/sys/bus/cxl/devices/memX/ram/size
22b39cb105SDan WilliamsDate:		December, 2020
23b39cb105SDan WilliamsKernelVersion:	v5.12
24b39cb105SDan WilliamsContact:	linux-cxl@vger.kernel.org
25b39cb105SDan WilliamsDescription:
26b39cb105SDan Williams		(RO) "Volatile Only Capacity" as bytes. Represents the
27b39cb105SDan Williams		identically named field in the Identify Memory Device Output
28b39cb105SDan Williams		Payload in the CXL-2.0 specification.
29b39cb105SDan Williams
306b625b2bSDan Williams
31b39cb105SDan WilliamsWhat:		/sys/bus/cxl/devices/memX/pmem/size
32b39cb105SDan WilliamsDate:		December, 2020
33b39cb105SDan WilliamsKernelVersion:	v5.12
34b39cb105SDan WilliamsContact:	linux-cxl@vger.kernel.org
35b39cb105SDan WilliamsDescription:
36b39cb105SDan Williams		(RO) "Persistent Only Capacity" as bytes. Represents the
37b39cb105SDan Williams		identically named field in the Identify Memory Device Output
38b39cb105SDan Williams		Payload in the CXL-2.0 specification.
394812be97SDan Williams
406b625b2bSDan Williams
41bcc79ea3SDan WilliamsWhat:		/sys/bus/cxl/devices/memX/serial
42bcc79ea3SDan WilliamsDate:		January, 2022
43bcc79ea3SDan WilliamsKernelVersion:	v5.18
44bcc79ea3SDan WilliamsContact:	linux-cxl@vger.kernel.org
45bcc79ea3SDan WilliamsDescription:
46bcc79ea3SDan Williams		(RO) 64-bit serial number per the PCIe Device Serial Number
47bcc79ea3SDan Williams		capability. Mandatory for CXL devices, see CXL 2.0 8.1.12.2
48bcc79ea3SDan Williams		Memory Device PCIe Capabilities and Extended Capabilities.
49bcc79ea3SDan Williams
506b625b2bSDan Williams
51cf1f6877SDan WilliamsWhat:		/sys/bus/cxl/devices/memX/numa_node
52cf1f6877SDan WilliamsDate:		January, 2022
53cf1f6877SDan WilliamsKernelVersion:	v5.18
54cf1f6877SDan WilliamsContact:	linux-cxl@vger.kernel.org
55cf1f6877SDan WilliamsDescription:
56cf1f6877SDan Williams		(RO) If NUMA is enabled and the platform has affinitized the
57cf1f6877SDan Williams		host PCI device for this memory device, emit the CPU node
58cf1f6877SDan Williams		affinity for this device.
59cf1f6877SDan Williams
606b625b2bSDan Williams
614812be97SDan WilliamsWhat:		/sys/bus/cxl/devices/*/devtype
624812be97SDan WilliamsDate:		June, 2021
634812be97SDan WilliamsKernelVersion:	v5.14
644812be97SDan WilliamsContact:	linux-cxl@vger.kernel.org
654812be97SDan WilliamsDescription:
6686677a4eSDan Williams		(RO) CXL device objects export the devtype attribute which
6786677a4eSDan Williams		mirrors the same value communicated in the DEVTYPE environment
6886677a4eSDan Williams		variable for uevents for devices on the "cxl" bus.
694812be97SDan Williams
706b625b2bSDan Williams
7183fbdbe4SDan WilliamsWhat:		/sys/bus/cxl/devices/*/modalias
7283fbdbe4SDan WilliamsDate:		December, 2021
7383fbdbe4SDan WilliamsKernelVersion:	v5.18
7483fbdbe4SDan WilliamsContact:	linux-cxl@vger.kernel.org
7583fbdbe4SDan WilliamsDescription:
7686677a4eSDan Williams		(RO) CXL device objects export the modalias attribute which
7786677a4eSDan Williams		mirrors the same value communicated in the MODALIAS environment
7886677a4eSDan Williams		variable for uevents for devices on the "cxl" bus.
7983fbdbe4SDan Williams
806b625b2bSDan Williams
814812be97SDan WilliamsWhat:		/sys/bus/cxl/devices/portX/uport
824812be97SDan WilliamsDate:		June, 2021
834812be97SDan WilliamsKernelVersion:	v5.14
844812be97SDan WilliamsContact:	linux-cxl@vger.kernel.org
854812be97SDan WilliamsDescription:
8686677a4eSDan Williams		(RO) CXL port objects are enumerated from either a platform
8786677a4eSDan Williams		firmware device (ACPI0017 and ACPI0016) or PCIe switch upstream
8886677a4eSDan Williams		port with CXL component registers. The 'uport' symlink connects
8986677a4eSDan Williams		the CXL portX object to the device that published the CXL port
904812be97SDan Williams		capability.
917d4b5ca2SDan Williams
926b625b2bSDan Williams
93172738bbSDan WilliamsWhat:		/sys/bus/cxl/devices/{port,endpoint}X/parent_dport
94172738bbSDan WilliamsDate:		January, 2023
95172738bbSDan WilliamsKernelVersion:	v6.3
96172738bbSDan WilliamsContact:	linux-cxl@vger.kernel.org
97172738bbSDan WilliamsDescription:
98172738bbSDan Williams		(RO) CXL port objects are instantiated for each upstream port in
99172738bbSDan Williams		a CXL/PCIe switch, and for each endpoint to map the
100172738bbSDan Williams		corresponding memory device into the CXL port hierarchy. When a
101172738bbSDan Williams		descendant CXL port (switch or endpoint) is enumerated it is
102172738bbSDan Williams		useful to know which 'dport' object in the parent CXL port
103172738bbSDan Williams		routes to this descendant. The 'parent_dport' symlink points to
104172738bbSDan Williams		the device representing the downstream port of a CXL switch that
105172738bbSDan Williams		routes to {port,endpoint}X.
106172738bbSDan Williams
107172738bbSDan Williams
1087d4b5ca2SDan WilliamsWhat:		/sys/bus/cxl/devices/portX/dportY
1097d4b5ca2SDan WilliamsDate:		June, 2021
1107d4b5ca2SDan WilliamsKernelVersion:	v5.14
1117d4b5ca2SDan WilliamsContact:	linux-cxl@vger.kernel.org
1127d4b5ca2SDan WilliamsDescription:
11386677a4eSDan Williams		(RO) CXL port objects are enumerated from either a platform
11486677a4eSDan Williams		firmware device (ACPI0017 and ACPI0016) or PCIe switch upstream
11586677a4eSDan Williams		port with CXL component registers. The 'dportY' symlink
11686677a4eSDan Williams		identifies one or more downstream ports that the upstream port
11786677a4eSDan Williams		may target in its decode of CXL memory resources.  The 'Y'
11886677a4eSDan Williams		integer reflects the hardware port unique-id used in the
11986677a4eSDan Williams		hardware decoder target list.
12040ba17afSDan Williams
1216b625b2bSDan Williams
12240ba17afSDan WilliamsWhat:		/sys/bus/cxl/devices/decoderX.Y
12340ba17afSDan WilliamsDate:		June, 2021
12440ba17afSDan WilliamsKernelVersion:	v5.14
12540ba17afSDan WilliamsContact:	linux-cxl@vger.kernel.org
12640ba17afSDan WilliamsDescription:
12786677a4eSDan Williams		(RO) CXL decoder objects are enumerated from either a platform
12840ba17afSDan Williams		firmware description, or a CXL HDM decoder register set in a
12940ba17afSDan Williams		PCIe device (see CXL 2.0 section 8.2.5.12 CXL HDM Decoder
13040ba17afSDan Williams		Capability Structure). The 'X' in decoderX.Y represents the
13140ba17afSDan Williams		cxl_port container of this decoder, and 'Y' represents the
13240ba17afSDan Williams		instance id of a given decoder resource.
13340ba17afSDan Williams
1346b625b2bSDan Williams
13540ba17afSDan WilliamsWhat:		/sys/bus/cxl/devices/decoderX.Y/{start,size}
13640ba17afSDan WilliamsDate:		June, 2021
13740ba17afSDan WilliamsKernelVersion:	v5.14
13840ba17afSDan WilliamsContact:	linux-cxl@vger.kernel.org
13940ba17afSDan WilliamsDescription:
14086677a4eSDan Williams		(RO) The 'start' and 'size' attributes together convey the
14186677a4eSDan Williams		physical address base and number of bytes mapped in the
14286677a4eSDan Williams		decoder's decode window. For decoders of devtype
14386677a4eSDan Williams		"cxl_decoder_root" the address range is fixed. For decoders of
14486677a4eSDan Williams		devtype "cxl_decoder_switch" the address is bounded by the
14586677a4eSDan Williams		decode range of the cxl_port ancestor of the decoder's cxl_port,
14686677a4eSDan Williams		and dynamically updates based on the active memory regions in
14786677a4eSDan Williams		that address space.
14840ba17afSDan Williams
1496b625b2bSDan Williams
15040ba17afSDan WilliamsWhat:		/sys/bus/cxl/devices/decoderX.Y/locked
15140ba17afSDan WilliamsDate:		June, 2021
15240ba17afSDan WilliamsKernelVersion:	v5.14
15340ba17afSDan WilliamsContact:	linux-cxl@vger.kernel.org
15440ba17afSDan WilliamsDescription:
15586677a4eSDan Williams		(RO) CXL HDM decoders have the capability to lock the
15686677a4eSDan Williams		configuration until the next device reset. For decoders of
15786677a4eSDan Williams		devtype "cxl_decoder_root" there is no standard facility to
15886677a4eSDan Williams		unlock them.  For decoders of devtype "cxl_decoder_switch" a
15986677a4eSDan Williams		secondary bus reset, of the PCIe bridge that provides the bus
16086677a4eSDan Williams		for this decoders uport, unlocks / resets the decoder.
16140ba17afSDan Williams
1626b625b2bSDan Williams
16340ba17afSDan WilliamsWhat:		/sys/bus/cxl/devices/decoderX.Y/target_list
16440ba17afSDan WilliamsDate:		June, 2021
16540ba17afSDan WilliamsKernelVersion:	v5.14
16640ba17afSDan WilliamsContact:	linux-cxl@vger.kernel.org
16740ba17afSDan WilliamsDescription:
16886677a4eSDan Williams		(RO) Display a comma separated list of the current decoder
16986677a4eSDan Williams		target configuration. The list is ordered by the current
17086677a4eSDan Williams		configured interleave order of the decoder's dport instances.
17186677a4eSDan Williams		Each entry in the list is a dport id.
17240ba17afSDan Williams
1736b625b2bSDan Williams
17440ba17afSDan WilliamsWhat:		/sys/bus/cxl/devices/decoderX.Y/cap_{pmem,ram,type2,type3}
17540ba17afSDan WilliamsDate:		June, 2021
17640ba17afSDan WilliamsKernelVersion:	v5.14
17740ba17afSDan WilliamsContact:	linux-cxl@vger.kernel.org
17840ba17afSDan WilliamsDescription:
17986677a4eSDan Williams		(RO) When a CXL decoder is of devtype "cxl_decoder_root", it
18040ba17afSDan Williams		represents a fixed memory window identified by platform
18140ba17afSDan Williams		firmware. A fixed window may only support a subset of memory
18240ba17afSDan Williams		types. The 'cap_*' attributes indicate whether persistent
18340ba17afSDan Williams		memory, volatile memory, accelerator memory, and / or expander
18440ba17afSDan Williams		memory may be mapped behind this decoder's memory window.
18540ba17afSDan Williams
1866b625b2bSDan Williams
18740ba17afSDan WilliamsWhat:		/sys/bus/cxl/devices/decoderX.Y/target_type
18840ba17afSDan WilliamsDate:		June, 2021
18940ba17afSDan WilliamsKernelVersion:	v5.14
19040ba17afSDan WilliamsContact:	linux-cxl@vger.kernel.org
19140ba17afSDan WilliamsDescription:
19286677a4eSDan Williams		(RO) When a CXL decoder is of devtype "cxl_decoder_switch", it
19386677a4eSDan Williams		can optionally decode either accelerator memory (type-2) or
19486677a4eSDan Williams		expander memory (type-3). The 'target_type' attribute indicates
19586677a4eSDan Williams		the current setting which may dynamically change based on what
19640ba17afSDan Williams		memory regions are activated in this decode hierarchy.
197c9700604SIra Weiny
1986b625b2bSDan Williams
199c9700604SIra WeinyWhat:		/sys/bus/cxl/devices/endpointX/CDAT
200c9700604SIra WeinyDate:		July, 2022
2018752efd2SDan WilliamsKernelVersion:	v6.0
202c9700604SIra WeinyContact:	linux-cxl@vger.kernel.org
203c9700604SIra WeinyDescription:
204c9700604SIra Weiny		(RO) If this sysfs entry is not present no DOE mailbox was
205c9700604SIra Weiny		found to support CDAT data.  If it is present and the length of
206c9700604SIra Weiny		the data is 0 reading the CDAT data failed.  Otherwise the CDAT
207c9700604SIra Weiny		data is reported.
2082c866903SDan Williams
2092c866903SDan Williams
2102c866903SDan WilliamsWhat:		/sys/bus/cxl/devices/decoderX.Y/mode
2112c866903SDan WilliamsDate:		May, 2022
2128752efd2SDan WilliamsKernelVersion:	v6.0
2132c866903SDan WilliamsContact:	linux-cxl@vger.kernel.org
2142c866903SDan WilliamsDescription:
215cf880423SDan Williams		(RW) When a CXL decoder is of devtype "cxl_decoder_endpoint" it
2162c866903SDan Williams		translates from a host physical address range, to a device local
2172c866903SDan Williams		address range. Device-local address ranges are further split
2182c866903SDan Williams		into a 'ram' (volatile memory) range and 'pmem' (persistent
2192c866903SDan Williams		memory) range. The 'mode' attribute emits one of 'ram', 'pmem',
2202c866903SDan Williams		'mixed', or 'none'. The 'mixed' indication is for error cases
2212c866903SDan Williams		when a decoder straddles the volatile/persistent partition
2222c866903SDan Williams		boundary, and 'none' indicates the decoder is not actively
2232c866903SDan Williams		decoding, or no DPA allocation policy has been set.
224cf880423SDan Williams
225cf880423SDan Williams		'mode' can be written, when the decoder is in the 'disabled'
226cf880423SDan Williams		state, with either 'ram' or 'pmem' to set the boundaries for the
227cf880423SDan Williams		next allocation.
228cf880423SDan Williams
229cf880423SDan Williams
230cf880423SDan WilliamsWhat:		/sys/bus/cxl/devices/decoderX.Y/dpa_resource
231cf880423SDan WilliamsDate:		May, 2022
2328752efd2SDan WilliamsKernelVersion:	v6.0
233cf880423SDan WilliamsContact:	linux-cxl@vger.kernel.org
234cf880423SDan WilliamsDescription:
235cf880423SDan Williams		(RO) When a CXL decoder is of devtype "cxl_decoder_endpoint",
236cf880423SDan Williams		and its 'dpa_size' attribute is non-zero, this attribute
237cf880423SDan Williams		indicates the device physical address (DPA) base address of the
238cf880423SDan Williams		allocation.
239cf880423SDan Williams
240cf880423SDan Williams
241cf880423SDan WilliamsWhat:		/sys/bus/cxl/devices/decoderX.Y/dpa_size
242cf880423SDan WilliamsDate:		May, 2022
2438752efd2SDan WilliamsKernelVersion:	v6.0
244cf880423SDan WilliamsContact:	linux-cxl@vger.kernel.org
245cf880423SDan WilliamsDescription:
246cf880423SDan Williams		(RW) When a CXL decoder is of devtype "cxl_decoder_endpoint" it
247cf880423SDan Williams		translates from a host physical address range, to a device local
248cf880423SDan Williams		address range. The range, base address plus length in bytes, of
249cf880423SDan Williams		DPA allocated to this decoder is conveyed in these 2 attributes.
250cf880423SDan Williams		Allocations can be mutated as long as the decoder is in the
251cf880423SDan Williams		disabled state. A write to 'dpa_size' releases the previous DPA
252cf880423SDan Williams		allocation and then attempts to allocate from the free capacity
253cf880423SDan Williams		in the device partition referred to by 'decoderX.Y/mode'.
254cf880423SDan Williams		Allocate and free requests can only be performed on the highest
255cf880423SDan Williams		instance number disabled decoder with non-zero size. I.e.
256cf880423SDan Williams		allocations are enforced to occur in increasing 'decoderX.Y/id'
257cf880423SDan Williams		order and frees are enforced to occur in decreasing
258cf880423SDan Williams		'decoderX.Y/id' order.
259538831f1SBen Widawsky
260538831f1SBen Widawsky
261538831f1SBen WidawskyWhat:		/sys/bus/cxl/devices/decoderX.Y/interleave_ways
262538831f1SBen WidawskyDate:		May, 2022
2638752efd2SDan WilliamsKernelVersion:	v6.0
264538831f1SBen WidawskyContact:	linux-cxl@vger.kernel.org
265538831f1SBen WidawskyDescription:
266538831f1SBen Widawsky		(RO) The number of targets across which this decoder's host
267538831f1SBen Widawsky		physical address (HPA) memory range is interleaved. The device
268538831f1SBen Widawsky		maps every Nth block of HPA (of size ==
269538831f1SBen Widawsky		'interleave_granularity') to consecutive DPA addresses. The
270538831f1SBen Widawsky		decoder's position in the interleave is determined by the
271538831f1SBen Widawsky		device's (endpoint or switch) switch ancestry. For root
272538831f1SBen Widawsky		decoders their interleave is specified by platform firmware and
273538831f1SBen Widawsky		they only specify a downstream target order for host bridges.
274538831f1SBen Widawsky
275538831f1SBen Widawsky
276538831f1SBen WidawskyWhat:		/sys/bus/cxl/devices/decoderX.Y/interleave_granularity
277538831f1SBen WidawskyDate:		May, 2022
2788752efd2SDan WilliamsKernelVersion:	v6.0
279538831f1SBen WidawskyContact:	linux-cxl@vger.kernel.org
280538831f1SBen WidawskyDescription:
281538831f1SBen Widawsky		(RO) The number of consecutive bytes of host physical address
282538831f1SBen Widawsky		space this decoder claims at address N before the decode rotates
283538831f1SBen Widawsky		to the next target in the interleave at address N +
284538831f1SBen Widawsky		interleave_granularity (assuming N is aligned to
285538831f1SBen Widawsky		interleave_granularity).
286779dd20cSBen Widawsky
287779dd20cSBen Widawsky
288*6e099264SDan WilliamsWhat:		/sys/bus/cxl/devices/decoderX.Y/create_{pmem,ram}_region
289*6e099264SDan WilliamsDate:		May, 2022, January, 2023
290*6e099264SDan WilliamsKernelVersion:	v6.0 (pmem), v6.3 (ram)
291779dd20cSBen WidawskyContact:	linux-cxl@vger.kernel.org
292779dd20cSBen WidawskyDescription:
293779dd20cSBen Widawsky		(RW) Write a string in the form 'regionZ' to start the process
294*6e099264SDan Williams		of defining a new persistent, or volatile memory region
295*6e099264SDan Williams		(interleave-set) within the decode range bounded by root decoder
296*6e099264SDan Williams		'decoderX.Y'. The value written must match the current value
297*6e099264SDan Williams		returned from reading this attribute. An atomic compare exchange
298*6e099264SDan Williams		operation is done on write to assign the requested id to a
299*6e099264SDan Williams		region and allocate the region-id for the next creation attempt.
300*6e099264SDan Williams		EBUSY is returned if the region name written does not match the
301*6e099264SDan Williams		current cached value.
302779dd20cSBen Widawsky
303779dd20cSBen Widawsky
304779dd20cSBen WidawskyWhat:		/sys/bus/cxl/devices/decoderX.Y/delete_region
305779dd20cSBen WidawskyDate:		May, 2022
3068752efd2SDan WilliamsKernelVersion:	v6.0
307779dd20cSBen WidawskyContact:	linux-cxl@vger.kernel.org
308779dd20cSBen WidawskyDescription:
309779dd20cSBen Widawsky		(WO) Write a string in the form 'regionZ' to delete that region,
310779dd20cSBen Widawsky		provided it is currently idle / not bound to a driver.
311dd5ba0ebSBen Widawsky
312dd5ba0ebSBen Widawsky
313dd5ba0ebSBen WidawskyWhat:		/sys/bus/cxl/devices/regionZ/uuid
314dd5ba0ebSBen WidawskyDate:		May, 2022
3158752efd2SDan WilliamsKernelVersion:	v6.0
316dd5ba0ebSBen WidawskyContact:	linux-cxl@vger.kernel.org
317dd5ba0ebSBen WidawskyDescription:
318dd5ba0ebSBen Widawsky		(RW) Write a unique identifier for the region. This field must
319dd5ba0ebSBen Widawsky		be set for persistent regions and it must not conflict with the
320a8e7d558SDan Williams		UUID of another region. For volatile ram regions this
321a8e7d558SDan Williams		attribute is a read-only empty string.
32280d10a6cSBen Widawsky
32380d10a6cSBen Widawsky
32480d10a6cSBen WidawskyWhat:		/sys/bus/cxl/devices/regionZ/interleave_granularity
32580d10a6cSBen WidawskyDate:		May, 2022
3268752efd2SDan WilliamsKernelVersion:	v6.0
32780d10a6cSBen WidawskyContact:	linux-cxl@vger.kernel.org
32880d10a6cSBen WidawskyDescription:
32980d10a6cSBen Widawsky		(RW) Set the number of consecutive bytes each device in the
33080d10a6cSBen Widawsky		interleave set will claim. The possible interleave granularity
33180d10a6cSBen Widawsky		values are determined by the CXL spec and the participating
33280d10a6cSBen Widawsky		devices.
33380d10a6cSBen Widawsky
33480d10a6cSBen Widawsky
33580d10a6cSBen WidawskyWhat:		/sys/bus/cxl/devices/regionZ/interleave_ways
33680d10a6cSBen WidawskyDate:		May, 2022
3378752efd2SDan WilliamsKernelVersion:	v6.0
33880d10a6cSBen WidawskyContact:	linux-cxl@vger.kernel.org
33980d10a6cSBen WidawskyDescription:
34080d10a6cSBen Widawsky		(RW) Configures the number of devices participating in the
34180d10a6cSBen Widawsky		region is set by writing this value. Each device will provide
34280d10a6cSBen Widawsky		1/interleave_ways of storage for the region.
34323a22cd1SDan Williams
34423a22cd1SDan Williams
34523a22cd1SDan WilliamsWhat:		/sys/bus/cxl/devices/regionZ/size
34623a22cd1SDan WilliamsDate:		May, 2022
3478752efd2SDan WilliamsKernelVersion:	v6.0
34823a22cd1SDan WilliamsContact:	linux-cxl@vger.kernel.org
34923a22cd1SDan WilliamsDescription:
35023a22cd1SDan Williams		(RW) System physical address space to be consumed by the region.
35123a22cd1SDan Williams		When written trigger the driver to allocate space out of the
35223a22cd1SDan Williams		parent root decoder's address space. When read the size of the
35323a22cd1SDan Williams		address space is reported and should match the span of the
35423a22cd1SDan Williams		region's resource attribute. Size shall be set after the
35523a22cd1SDan Williams		interleave configuration parameters. Once set it cannot be
35623a22cd1SDan Williams		changed, only freed by writing 0. The kernel makes no guarantees
35723a22cd1SDan Williams		that data is maintained over an address space freeing event, and
35823a22cd1SDan Williams		there is no guarantee that a free followed by an allocate
35923a22cd1SDan Williams		results in the same address being allocated.
36023a22cd1SDan Williams
36123a22cd1SDan Williams
3627d505f98SDan WilliamsWhat:		/sys/bus/cxl/devices/regionZ/mode
3637d505f98SDan WilliamsDate:		January, 2023
3647d505f98SDan WilliamsKernelVersion:	v6.3
3657d505f98SDan WilliamsContact:	linux-cxl@vger.kernel.org
3667d505f98SDan WilliamsDescription:
3677d505f98SDan Williams		(RO) The mode of a region is established at region creation time
3687d505f98SDan Williams		and dictates the mode of the endpoint decoder that comprise the
3697d505f98SDan Williams		region. For more details on the possible modes see
3707d505f98SDan Williams		/sys/bus/cxl/devices/decoderX.Y/mode
3717d505f98SDan Williams
3727d505f98SDan Williams
37323a22cd1SDan WilliamsWhat:		/sys/bus/cxl/devices/regionZ/resource
37423a22cd1SDan WilliamsDate:		May, 2022
3758752efd2SDan WilliamsKernelVersion:	v6.0
37623a22cd1SDan WilliamsContact:	linux-cxl@vger.kernel.org
37723a22cd1SDan WilliamsDescription:
37823a22cd1SDan Williams		(RO) A region is a contiguous partition of a CXL root decoder
37923a22cd1SDan Williams		address space. Region capacity is allocated by writing to the
38023a22cd1SDan Williams		size attribute, the resulting physical address space determined
38123a22cd1SDan Williams		by the driver is reflected here. It is therefore not useful to
38223a22cd1SDan Williams		read this before writing a value to the size attribute.
383b9686e8cSDan Williams
384b9686e8cSDan Williams
385b9686e8cSDan WilliamsWhat:		/sys/bus/cxl/devices/regionZ/target[0..N]
386b9686e8cSDan WilliamsDate:		May, 2022
3878752efd2SDan WilliamsKernelVersion:	v6.0
388b9686e8cSDan WilliamsContact:	linux-cxl@vger.kernel.org
389b9686e8cSDan WilliamsDescription:
390b9686e8cSDan Williams		(RW) Write an endpoint decoder object name to 'targetX' where X
391b9686e8cSDan Williams		is the intended position of the endpoint device in the region
392b9686e8cSDan Williams		interleave and N is the 'interleave_ways' setting for the
393b9686e8cSDan Williams		region. ENXIO is returned if the write results in an impossible
394b9686e8cSDan Williams		to map decode scenario, like the endpoint is unreachable at that
395b9686e8cSDan Williams		position relative to the root decoder interleave. EBUSY is
396b9686e8cSDan Williams		returned if the position in the region is already occupied, or
397b9686e8cSDan Williams		if the region is not in a state to accept interleave
398b9686e8cSDan Williams		configuration changes. EINVAL is returned if the object name is
399b9686e8cSDan Williams		not an endpoint decoder. Once all positions have been
400b9686e8cSDan Williams		successfully written a final validation for decode conflicts is
401b9686e8cSDan Williams		performed before activating the region.
402176baefbSDan Williams
403176baefbSDan Williams
404176baefbSDan WilliamsWhat:		/sys/bus/cxl/devices/regionZ/commit
405176baefbSDan WilliamsDate:		May, 2022
4068752efd2SDan WilliamsKernelVersion:	v6.0
407176baefbSDan WilliamsContact:	linux-cxl@vger.kernel.org
408176baefbSDan WilliamsDescription:
409176baefbSDan Williams		(RW) Write a boolean 'true' string value to this attribute to
410176baefbSDan Williams		trigger the region to transition from the software programmed
411176baefbSDan Williams		state to the actively decoding in hardware state. The commit
412176baefbSDan Williams		operation in addition to validating that the region is in proper
413176baefbSDan Williams		configured state, validates that the decoders are being
414176baefbSDan Williams		committed in spec mandated order (last committed decoder id +
415176baefbSDan Williams		1), and checks that the hardware accepts the commit request.
416176baefbSDan Williams		Reading this value indicates whether the region is committed or
417176baefbSDan Williams		not.
418