sysfs-bus-cxl 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390
  1. What: /sys/bus/cxl/flush
  2. Date: Januarry, 2022
  3. KernelVersion: v5.18
  4. Contact: [email protected]
  5. Description:
  6. (WO) If userspace manually unbinds a port the kernel schedules
  7. all descendant memdevs for unbind. Writing '1' to this attribute
  8. flushes that work.
  9. What: /sys/bus/cxl/devices/memX/firmware_version
  10. Date: December, 2020
  11. KernelVersion: v5.12
  12. Contact: [email protected]
  13. Description:
  14. (RO) "FW Revision" string as reported by the Identify
  15. Memory Device Output Payload in the CXL-2.0
  16. specification.
  17. What: /sys/bus/cxl/devices/memX/ram/size
  18. Date: December, 2020
  19. KernelVersion: v5.12
  20. Contact: [email protected]
  21. Description:
  22. (RO) "Volatile Only Capacity" as bytes. Represents the
  23. identically named field in the Identify Memory Device Output
  24. Payload in the CXL-2.0 specification.
  25. What: /sys/bus/cxl/devices/memX/pmem/size
  26. Date: December, 2020
  27. KernelVersion: v5.12
  28. Contact: [email protected]
  29. Description:
  30. (RO) "Persistent Only Capacity" as bytes. Represents the
  31. identically named field in the Identify Memory Device Output
  32. Payload in the CXL-2.0 specification.
  33. What: /sys/bus/cxl/devices/memX/serial
  34. Date: January, 2022
  35. KernelVersion: v5.18
  36. Contact: [email protected]
  37. Description:
  38. (RO) 64-bit serial number per the PCIe Device Serial Number
  39. capability. Mandatory for CXL devices, see CXL 2.0 8.1.12.2
  40. Memory Device PCIe Capabilities and Extended Capabilities.
  41. What: /sys/bus/cxl/devices/memX/numa_node
  42. Date: January, 2022
  43. KernelVersion: v5.18
  44. Contact: [email protected]
  45. Description:
  46. (RO) If NUMA is enabled and the platform has affinitized the
  47. host PCI device for this memory device, emit the CPU node
  48. affinity for this device.
  49. What: /sys/bus/cxl/devices/*/devtype
  50. Date: June, 2021
  51. KernelVersion: v5.14
  52. Contact: [email protected]
  53. Description:
  54. (RO) CXL device objects export the devtype attribute which
  55. mirrors the same value communicated in the DEVTYPE environment
  56. variable for uevents for devices on the "cxl" bus.
  57. What: /sys/bus/cxl/devices/*/modalias
  58. Date: December, 2021
  59. KernelVersion: v5.18
  60. Contact: [email protected]
  61. Description:
  62. (RO) CXL device objects export the modalias attribute which
  63. mirrors the same value communicated in the MODALIAS environment
  64. variable for uevents for devices on the "cxl" bus.
  65. What: /sys/bus/cxl/devices/portX/uport
  66. Date: June, 2021
  67. KernelVersion: v5.14
  68. Contact: [email protected]
  69. Description:
  70. (RO) CXL port objects are enumerated from either a platform
  71. firmware device (ACPI0017 and ACPI0016) or PCIe switch upstream
  72. port with CXL component registers. The 'uport' symlink connects
  73. the CXL portX object to the device that published the CXL port
  74. capability.
  75. What: /sys/bus/cxl/devices/portX/dportY
  76. Date: June, 2021
  77. KernelVersion: v5.14
  78. Contact: [email protected]
  79. Description:
  80. (RO) CXL port objects are enumerated from either a platform
  81. firmware device (ACPI0017 and ACPI0016) or PCIe switch upstream
  82. port with CXL component registers. The 'dportY' symlink
  83. identifies one or more downstream ports that the upstream port
  84. may target in its decode of CXL memory resources. The 'Y'
  85. integer reflects the hardware port unique-id used in the
  86. hardware decoder target list.
  87. What: /sys/bus/cxl/devices/decoderX.Y
  88. Date: June, 2021
  89. KernelVersion: v5.14
  90. Contact: [email protected]
  91. Description:
  92. (RO) CXL decoder objects are enumerated from either a platform
  93. firmware description, or a CXL HDM decoder register set in a
  94. PCIe device (see CXL 2.0 section 8.2.5.12 CXL HDM Decoder
  95. Capability Structure). The 'X' in decoderX.Y represents the
  96. cxl_port container of this decoder, and 'Y' represents the
  97. instance id of a given decoder resource.
  98. What: /sys/bus/cxl/devices/decoderX.Y/{start,size}
  99. Date: June, 2021
  100. KernelVersion: v5.14
  101. Contact: [email protected]
  102. Description:
  103. (RO) The 'start' and 'size' attributes together convey the
  104. physical address base and number of bytes mapped in the
  105. decoder's decode window. For decoders of devtype
  106. "cxl_decoder_root" the address range is fixed. For decoders of
  107. devtype "cxl_decoder_switch" the address is bounded by the
  108. decode range of the cxl_port ancestor of the decoder's cxl_port,
  109. and dynamically updates based on the active memory regions in
  110. that address space.
  111. What: /sys/bus/cxl/devices/decoderX.Y/locked
  112. Date: June, 2021
  113. KernelVersion: v5.14
  114. Contact: [email protected]
  115. Description:
  116. (RO) CXL HDM decoders have the capability to lock the
  117. configuration until the next device reset. For decoders of
  118. devtype "cxl_decoder_root" there is no standard facility to
  119. unlock them. For decoders of devtype "cxl_decoder_switch" a
  120. secondary bus reset, of the PCIe bridge that provides the bus
  121. for this decoders uport, unlocks / resets the decoder.
  122. What: /sys/bus/cxl/devices/decoderX.Y/target_list
  123. Date: June, 2021
  124. KernelVersion: v5.14
  125. Contact: [email protected]
  126. Description:
  127. (RO) Display a comma separated list of the current decoder
  128. target configuration. The list is ordered by the current
  129. configured interleave order of the decoder's dport instances.
  130. Each entry in the list is a dport id.
  131. What: /sys/bus/cxl/devices/decoderX.Y/cap_{pmem,ram,type2,type3}
  132. Date: June, 2021
  133. KernelVersion: v5.14
  134. Contact: [email protected]
  135. Description:
  136. (RO) When a CXL decoder is of devtype "cxl_decoder_root", it
  137. represents a fixed memory window identified by platform
  138. firmware. A fixed window may only support a subset of memory
  139. types. The 'cap_*' attributes indicate whether persistent
  140. memory, volatile memory, accelerator memory, and / or expander
  141. memory may be mapped behind this decoder's memory window.
  142. What: /sys/bus/cxl/devices/decoderX.Y/target_type
  143. Date: June, 2021
  144. KernelVersion: v5.14
  145. Contact: [email protected]
  146. Description:
  147. (RO) When a CXL decoder is of devtype "cxl_decoder_switch", it
  148. can optionally decode either accelerator memory (type-2) or
  149. expander memory (type-3). The 'target_type' attribute indicates
  150. the current setting which may dynamically change based on what
  151. memory regions are activated in this decode hierarchy.
  152. What: /sys/bus/cxl/devices/endpointX/CDAT
  153. Date: July, 2022
  154. KernelVersion: v5.20
  155. Contact: [email protected]
  156. Description:
  157. (RO) If this sysfs entry is not present no DOE mailbox was
  158. found to support CDAT data. If it is present and the length of
  159. the data is 0 reading the CDAT data failed. Otherwise the CDAT
  160. data is reported.
  161. What: /sys/bus/cxl/devices/decoderX.Y/mode
  162. Date: May, 2022
  163. KernelVersion: v5.20
  164. Contact: [email protected]
  165. Description:
  166. (RW) When a CXL decoder is of devtype "cxl_decoder_endpoint" it
  167. translates from a host physical address range, to a device local
  168. address range. Device-local address ranges are further split
  169. into a 'ram' (volatile memory) range and 'pmem' (persistent
  170. memory) range. The 'mode' attribute emits one of 'ram', 'pmem',
  171. 'mixed', or 'none'. The 'mixed' indication is for error cases
  172. when a decoder straddles the volatile/persistent partition
  173. boundary, and 'none' indicates the decoder is not actively
  174. decoding, or no DPA allocation policy has been set.
  175. 'mode' can be written, when the decoder is in the 'disabled'
  176. state, with either 'ram' or 'pmem' to set the boundaries for the
  177. next allocation.
  178. What: /sys/bus/cxl/devices/decoderX.Y/dpa_resource
  179. Date: May, 2022
  180. KernelVersion: v5.20
  181. Contact: [email protected]
  182. Description:
  183. (RO) When a CXL decoder is of devtype "cxl_decoder_endpoint",
  184. and its 'dpa_size' attribute is non-zero, this attribute
  185. indicates the device physical address (DPA) base address of the
  186. allocation.
  187. What: /sys/bus/cxl/devices/decoderX.Y/dpa_size
  188. Date: May, 2022
  189. KernelVersion: v5.20
  190. Contact: [email protected]
  191. Description:
  192. (RW) When a CXL decoder is of devtype "cxl_decoder_endpoint" it
  193. translates from a host physical address range, to a device local
  194. address range. The range, base address plus length in bytes, of
  195. DPA allocated to this decoder is conveyed in these 2 attributes.
  196. Allocations can be mutated as long as the decoder is in the
  197. disabled state. A write to 'dpa_size' releases the previous DPA
  198. allocation and then attempts to allocate from the free capacity
  199. in the device partition referred to by 'decoderX.Y/mode'.
  200. Allocate and free requests can only be performed on the highest
  201. instance number disabled decoder with non-zero size. I.e.
  202. allocations are enforced to occur in increasing 'decoderX.Y/id'
  203. order and frees are enforced to occur in decreasing
  204. 'decoderX.Y/id' order.
  205. What: /sys/bus/cxl/devices/decoderX.Y/interleave_ways
  206. Date: May, 2022
  207. KernelVersion: v5.20
  208. Contact: [email protected]
  209. Description:
  210. (RO) The number of targets across which this decoder's host
  211. physical address (HPA) memory range is interleaved. The device
  212. maps every Nth block of HPA (of size ==
  213. 'interleave_granularity') to consecutive DPA addresses. The
  214. decoder's position in the interleave is determined by the
  215. device's (endpoint or switch) switch ancestry. For root
  216. decoders their interleave is specified by platform firmware and
  217. they only specify a downstream target order for host bridges.
  218. What: /sys/bus/cxl/devices/decoderX.Y/interleave_granularity
  219. Date: May, 2022
  220. KernelVersion: v5.20
  221. Contact: [email protected]
  222. Description:
  223. (RO) The number of consecutive bytes of host physical address
  224. space this decoder claims at address N before the decode rotates
  225. to the next target in the interleave at address N +
  226. interleave_granularity (assuming N is aligned to
  227. interleave_granularity).
  228. What: /sys/bus/cxl/devices/decoderX.Y/create_pmem_region
  229. Date: May, 2022
  230. KernelVersion: v5.20
  231. Contact: [email protected]
  232. Description:
  233. (RW) Write a string in the form 'regionZ' to start the process
  234. of defining a new persistent memory region (interleave-set)
  235. within the decode range bounded by root decoder 'decoderX.Y'.
  236. The value written must match the current value returned from
  237. reading this attribute. An atomic compare exchange operation is
  238. done on write to assign the requested id to a region and
  239. allocate the region-id for the next creation attempt. EBUSY is
  240. returned if the region name written does not match the current
  241. cached value.
  242. What: /sys/bus/cxl/devices/decoderX.Y/delete_region
  243. Date: May, 2022
  244. KernelVersion: v5.20
  245. Contact: [email protected]
  246. Description:
  247. (WO) Write a string in the form 'regionZ' to delete that region,
  248. provided it is currently idle / not bound to a driver.
  249. What: /sys/bus/cxl/devices/regionZ/uuid
  250. Date: May, 2022
  251. KernelVersion: v5.20
  252. Contact: [email protected]
  253. Description:
  254. (RW) Write a unique identifier for the region. This field must
  255. be set for persistent regions and it must not conflict with the
  256. UUID of another region.
  257. What: /sys/bus/cxl/devices/regionZ/interleave_granularity
  258. Date: May, 2022
  259. KernelVersion: v5.20
  260. Contact: [email protected]
  261. Description:
  262. (RW) Set the number of consecutive bytes each device in the
  263. interleave set will claim. The possible interleave granularity
  264. values are determined by the CXL spec and the participating
  265. devices.
  266. What: /sys/bus/cxl/devices/regionZ/interleave_ways
  267. Date: May, 2022
  268. KernelVersion: v5.20
  269. Contact: [email protected]
  270. Description:
  271. (RW) Configures the number of devices participating in the
  272. region is set by writing this value. Each device will provide
  273. 1/interleave_ways of storage for the region.
  274. What: /sys/bus/cxl/devices/regionZ/size
  275. Date: May, 2022
  276. KernelVersion: v5.20
  277. Contact: [email protected]
  278. Description:
  279. (RW) System physical address space to be consumed by the region.
  280. When written trigger the driver to allocate space out of the
  281. parent root decoder's address space. When read the size of the
  282. address space is reported and should match the span of the
  283. region's resource attribute. Size shall be set after the
  284. interleave configuration parameters. Once set it cannot be
  285. changed, only freed by writing 0. The kernel makes no guarantees
  286. that data is maintained over an address space freeing event, and
  287. there is no guarantee that a free followed by an allocate
  288. results in the same address being allocated.
  289. What: /sys/bus/cxl/devices/regionZ/resource
  290. Date: May, 2022
  291. KernelVersion: v5.20
  292. Contact: [email protected]
  293. Description:
  294. (RO) A region is a contiguous partition of a CXL root decoder
  295. address space. Region capacity is allocated by writing to the
  296. size attribute, the resulting physical address space determined
  297. by the driver is reflected here. It is therefore not useful to
  298. read this before writing a value to the size attribute.
  299. What: /sys/bus/cxl/devices/regionZ/target[0..N]
  300. Date: May, 2022
  301. KernelVersion: v5.20
  302. Contact: [email protected]
  303. Description:
  304. (RW) Write an endpoint decoder object name to 'targetX' where X
  305. is the intended position of the endpoint device in the region
  306. interleave and N is the 'interleave_ways' setting for the
  307. region. ENXIO is returned if the write results in an impossible
  308. to map decode scenario, like the endpoint is unreachable at that
  309. position relative to the root decoder interleave. EBUSY is
  310. returned if the position in the region is already occupied, or
  311. if the region is not in a state to accept interleave
  312. configuration changes. EINVAL is returned if the object name is
  313. not an endpoint decoder. Once all positions have been
  314. successfully written a final validation for decode conflicts is
  315. performed before activating the region.
  316. What: /sys/bus/cxl/devices/regionZ/commit
  317. Date: May, 2022
  318. KernelVersion: v5.20
  319. Contact: [email protected]
  320. Description:
  321. (RW) Write a boolean 'true' string value to this attribute to
  322. trigger the region to transition from the software programmed
  323. state to the actively decoding in hardware state. The commit
  324. operation in addition to validating that the region is in proper
  325. configured state, validates that the decoders are being
  326. committed in spec mandated order (last committed decoder id +
  327. 1), and checks that the hardware accepts the commit request.
  328. Reading this value indicates whether the region is committed or
  329. not.