Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

/sys/class/ocxl

FieldValue
SubsystemOCXL AFU (accelerator function unit) class, OpenCAPI; contact linuxppc-dev@lists.ozlabs.org; implementation file not in cached tree
Config gatenot verifiable from cached tree (no drivers/Kconfig cached)
ABI documentationDocumentation/ABI/testing/sysfs-class-ocxl (6 What: entries)
Sincenot stated in the ABI file (Date January 2018; reload_on_reset Date February 2020)
Live (5.10.134 host)class absent: /sys/class/ocxl does not exist in this container
Ledger IDSYSC-ocxl

What it represents

One directory per OpenCAPI AFU, named by AFU name. The attributes expose the AFU’s own configuration space (afu_version, mmio area sizes), the context usage counter, and a control for FPGA image reload on link reset. This is the userspace-visible surface of OpenCAPI accelerators on Power platforms, a successor interface to the older CAPI cxl class (which lived in the same /sys/class namespace under a different name and was removed in 6.15).

Relationship to the device model

The ABI consistently reads sizes and versions “as defined in the configuration space of the AFU” / “in the configuration space of the AFU”, i.e. the class files are views over the AFU device’s config space. global_mmio_area gives read/write access to “the global mmio area for the AFU”. No bus, parent, or symlink structure is described in the cached file; no further device-model claims are made here.

Attributes

AttributeR/WUnit/formatConditional?Source
afu_versionROversion of the AFU, <major>:<minor>, read from AFU config spacealwaysABI testing sysfs-class-ocxl, Jan 2018
contextsRO<n>/<max>: active contexts (for debug) over maximum contexts supportedalwaysABI, Jan 2018
pp_mmio_sizeROsize of the per-process MMIO area, from config spacealwaysABI, Jan 2018
global_mmio_sizeROsize of the global MMIO area, from config spacealwaysABI, Jan 2018
global_mmio_areaRWaccess to the global MMIO area of the AFUalwaysABI, Jan 2018
reload_on_resetRW0 do not reload FPGA image from flash, 1 reload, “unavailable” if unsupported; needs a vendor-specific logic block on the FPGAif device supports itABI, Feb 2020

Safety and writes

Reads are safe. The two writable files touch hardware state: global_mmio_area exposes the AFU’s global MMIO to whomever can write sysfs, and reload_on_reset decides whether a link reset reflashes the FPGA image – a persistent firmware-affecting action. The class is absent on the 5.10.134 host (x86 container, no OpenCAPI), so no live read was possible and no permission bits or value examples are reported.

References

  • Documentation/ABI/testing/sysfs-class-ocxl (cached copy)
  • https://github.com/torvalds/linux/blob/master/Documentation/ABI/testing/sysfs-class-ocxl
  • sysfs-attrs.json entry ocxl; live enumeration: class absent, kernel 5.10.134
  • Related page: cxl (removed CAPI class); coverage: ledger