€•¯VŒsphinx.addnodes”Œdocument”“”)”}”(Œ rawsource”Œ”Œchildren”]”(Œ translations”Œ LanguagesNode”“”)”}”(hhh]”(hŒ pending_xref”“”)”}”(hhh]”Œdocutils.nodes”ŒText”“”ŒChinese (Simplified)”…””}”Œparent”hsbaŒ attributes”}”(Œids”]”Œclasses”]”Œnames”]”Œdupnames”]”Œbackrefs”]”Œ refdomain”Œstd”Œreftype”Œdoc”Œ reftarget”Œ3/translations/zh_CN/userspace-api/accelerators/ocxl”Œmodname”NŒ classname”NŒ refexplicit”ˆuŒtagname”hhh ubh)”}”(hhh]”hŒChinese (Traditional)”…””}”hh2sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ3/translations/zh_TW/userspace-api/accelerators/ocxl”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒItalian”…””}”hhFsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ3/translations/it_IT/userspace-api/accelerators/ocxl”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒJapanese”…””}”hhZsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ3/translations/ja_JP/userspace-api/accelerators/ocxl”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒKorean”…””}”hhnsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ3/translations/ko_KR/userspace-api/accelerators/ocxl”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒSpanish”…””}”hh‚sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ3/translations/sp_SP/userspace-api/accelerators/ocxl”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubeh}”(h]”h ]”h"]”h$]”h&]”Œcurrent_language”ŒEnglish”uh1h hhŒ _document”hŒsource”NŒline”NubhŒsection”“”)”}”(hhh]”(hŒtitle”“”)”}”(hŒ8OpenCAPI (Open Coherent Accelerator Processor Interface)”h]”hŒ8OpenCAPI (Open Coherent Accelerator Processor Interface)”…””}”(hh¨hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¦hh£hžhhŸŒM/var/lib/git/docbuild/linux/Documentation/userspace-api/accelerators/ocxl.rst”h KubhŒ paragraph”“”)”}”(hŒnOpenCAPI is an interface between processors and accelerators. It aims at being low-latency and high-bandwidth.”h]”hŒnOpenCAPI is an interface between processors and accelerators. It aims at being low-latency and high-bandwidth.”…””}”(hh¹hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h·hŸh¶h Khh£hžhubh¸)”}”(hŒÇThe specification was developed by the OpenCAPI Consortium, and is now available from the `Compute Express Link Consortium `_.”h]”(hŒZThe specification was developed by the OpenCAPI Consortium, and is now available from the ”…””}”(hhÇhžhhŸNh NubhŒ reference”“”)”}”(hŒl`Compute Express Link Consortium `_”h]”hŒCompute Express Link Consortium”…””}”(hhÑhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”Œname”ŒCompute Express Link Consortium”Œrefuri”ŒGhttps://computeexpresslink.org/resource/opencapi-specification-archive/”uh1hÏhhÇubhŒtarget”“”)”}”(hŒJ ”h]”h}”(h]”Œcompute-express-link-consortium”ah ]”h"]”Œcompute express link consortium”ah$]”h&]”Œrefuri”hâuh1h㌠referenced”KhhÇubhŒ.”…””}”(hhÇhžhhŸNh Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1h·hŸh¶h Khh£hžhubh¸)”}”(hŒÑIt allows an accelerator (which could be an FPGA, ASICs, ...) to access the host memory coherently, using virtual addresses. An OpenCAPI device can also host its own memory, that can be accessed from the host.”h]”hŒÑIt allows an accelerator (which could be an FPGA, ASICs, ...) to access the host memory coherently, using virtual addresses. An OpenCAPI device can also host its own memory, that can be accessed from the host.”…””}”(hhýhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h·hŸh¶h K hh£hžhubh¸)”}”(hŒ×OpenCAPI is known in linux as 'ocxl', as the open, processor-agnostic evolution of 'cxl' (the driver for the IBM CAPI interface for powerpc), which was named that way to avoid confusion with the ISDN CAPI subsystem.”h]”hŒßOpenCAPI is known in linux as ‘ocxl’, as the open, processor-agnostic evolution of ‘cxl’ (the driver for the IBM CAPI interface for powerpc), which was named that way to avoid confusion with the ISDN CAPI subsystem.”…””}”(hj hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h·hŸh¶h Khh£hžhubh¢)”}”(hhh]”(h§)”}”(hŒHigh-level view”h]”hŒHigh-level view”…””}”(hjhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¦hjhžhhŸh¶h Kubh¸)”}”(hŒ½OpenCAPI defines a Data Link Layer (DL) and Transaction Layer (TL), to be implemented on top of a physical link. Any processor or device implementing the DL and TL can start sharing memory.”h]”hŒ½OpenCAPI defines a Data Link Layer (DL) and Transaction Layer (TL), to be implemented on top of a physical link. Any processor or device implementing the DL and TL can start sharing memory.”…””}”(hj*hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h·hŸh¶h KhjhžhubhŒ literal_block”“”)”}”(hX+-----------+ +-------------+ | | | | | | | Accelerated | | Processor | | Function | | | +--------+ | Unit | +--------+ | |--| Memory | | (AFU) |--| Memory | | | +--------+ | | +--------+ +-----------+ +-------------+ | | +-----------+ +-------------+ | TL | | TLX | +-----------+ +-------------+ | | +-----------+ +-------------+ | DL | | DLX | +-----------+ +-------------+ | | | PHY | +---------------------------------------+”h]”hX+-----------+ +-------------+ | | | | | | | Accelerated | | Processor | | Function | | | +--------+ | Unit | +--------+ | |--| Memory | | (AFU) |--| Memory | | | +--------+ | | +--------+ +-----------+ +-------------+ | | +-----------+ +-------------+ | TL | | TLX | +-----------+ +-------------+ | | +-----------+ +-------------+ | DL | | DLX | +-----------+ +-------------+ | | | PHY | +---------------------------------------+”…””}”hj:sbah}”(h]”h ]”h"]”h$]”h&]”Œ xml:space”Œpreserve”uh1j8hŸh¶h K hjhžhubeh}”(h]”Œhigh-level-view”ah ]”h"]”Œhigh-level view”ah$]”h&]”uh1h¡hh£hžhhŸh¶h Kubh¢)”}”(hhh]”(h§)”}”(hŒDevice discovery”h]”hŒDevice discovery”…””}”(hjUhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¦hjRhžhhŸh¶h K7ubh¸)”}”(hŒ‰OpenCAPI relies on a PCI-like configuration space, implemented on the device. So the host can discover AFUs by querying the config space.”h]”hŒ‰OpenCAPI relies on a PCI-like configuration space, implemented on the device. So the host can discover AFUs by querying the config space.”…””}”(hjchžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h·hŸh¶h K9hjRhžhubh¸)”}”(hXiOpenCAPI devices in Linux are treated like PCI devices (with a few caveats). The firmware is expected to abstract the hardware as if it was a PCI link. A lot of the existing PCI infrastructure is reused: devices are scanned and BARs are assigned during the standard PCI enumeration. Commands like 'lspci' can therefore be used to see what devices are available.”h]”hXmOpenCAPI devices in Linux are treated like PCI devices (with a few caveats). The firmware is expected to abstract the hardware as if it was a PCI link. A lot of the existing PCI infrastructure is reused: devices are scanned and BARs are assigned during the standard PCI enumeration. Commands like ‘lspci’ can therefore be used to see what devices are available.”…””}”(hjqhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h·hŸh¶h K..”h]”hŒaChar devices can be found in /dev/ocxl/ and are named as: /dev/ocxl/..”…””}”(hjNhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h·hŸh¶h Khhj/hžhubh¸)”}”(hXYwhere is a max 20-character long name, as found in the config space of the AFU. is added by the driver and can help distinguish devices when a system has more than one instance of the same OpenCAPI device. is also to help distinguish AFUs in the unlikely case where a device carries multiple copies of the same AFU.”h]”hXYwhere is a max 20-character long name, as found in the config space of the AFU. is added by the driver and can help distinguish devices when a system has more than one instance of the same OpenCAPI device. is also to help distinguish AFUs in the unlikely case where a device carries multiple copies of the same AFU.”…””}”(hj\hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h·hŸh¶h Kkhj/hžhubeh}”(h]”Œ char-devices”ah ]”h"]”Œ char devices”ah$]”h&]”uh1h¡hh£hžhhŸh¶h Kaubh¢)”}”(hhh]”(h§)”}”(hŒ Sysfs class”h]”hŒ Sysfs class”…””}”(hjuhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¦hjrhžhhŸh¶h Kuubh¸)”}”(hŒ˜An ocxl class is added for the devices representing the AFUs. See /sys/class/ocxl. The layout is described in Documentation/ABI/testing/sysfs-class-ocxl”h]”hŒ˜An ocxl class is added for the devices representing the AFUs. See /sys/class/ocxl. The layout is described in Documentation/ABI/testing/sysfs-class-ocxl”…””}”(hjƒhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h·hŸh¶h Kwhjrhžhubeh}”(h]”Œ sysfs-class”ah ]”h"]”Œ sysfs class”ah$]”h&]”uh1h¡hh£hžhhŸh¶h Kuubh¢)”}”(hhh]”(h§)”}”(hŒUser API”h]”hŒUser API”…””}”(hjœhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¦hj™hžhhŸh¶h K~ubh¢)”}”(hhh]”(h§)”}”(hŒopen”h]”hŒopen”…””}”(hj­hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¦hjªhžhhŸh¶h Kubh¸)”}”(hŒÒBased on the AFU definition found in the config space, an AFU may support working with more than one memory context, in which case the associated char device may be opened multiple times by different processes.”h]”hŒÒBased on the AFU definition found in the config space, an AFU may support working with more than one memory context, in which case the associated char device may be opened multiple times by different processes.”…””}”(hj»hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h·hŸh¶h Kƒhjªhžhubeh}”(h]”Œopen”ah ]”h"]”Œopen”ah$]”h&]”uh1h¡hj™hžhhŸh¶h Kubh¢)”}”(hhh]”(h§)”}”(hŒioctl”h]”hŒioctl”…””}”(hjÔhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¦hjÑhžhhŸh¶h KŠubh¸)”}”(hŒOCXL_IOCTL_ATTACH:”h]”hŒOCXL_IOCTL_ATTACH:”…””}”(hjâhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h·hŸh¶h KŒhjÑhžhubhŒ block_quote”“”)”}”(hŒcAttach the memory context of the calling process to the AFU so that the AFU can access its memory. ”h]”h¸)”}”(hŒbAttach the memory context of the calling process to the AFU so that the AFU can access its memory.”h]”hŒbAttach the memory context of the calling process to the AFU so that the AFU can access its memory.”…””}”(hjöhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h·hŸh¶h KŽhjòubah}”(h]”h ]”h"]”h$]”h&]”uh1jðhŸh¶h KŽhjÑhžhubh¸)”}”(hŒOCXL_IOCTL_IRQ_ALLOC:”h]”hŒOCXL_IOCTL_IRQ_ALLOC:”…””}”(hj hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h·hŸh¶h K‘hjÑhžhubjñ)”}”(hŒ4Allocate an AFU interrupt and return an identifier. ”h]”h¸)”}”(hŒ3Allocate an AFU interrupt and return an identifier.”h]”hŒ3Allocate an AFU interrupt and return an identifier.”…””}”(hjhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h·hŸh¶h K“hjubah}”(h]”h ]”h"]”h$]”h&]”uh1jðhŸh¶h K“hjÑhžhubh¸)”}”(hŒOCXL_IOCTL_IRQ_FREE:”h]”hŒOCXL_IOCTL_IRQ_FREE:”…””}”(hj0hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h·hŸh¶h K•hjÑhžhubjñ)”}”(hŒ+Free a previously allocated AFU interrupt. ”h]”h¸)”}”(hŒ*Free a previously allocated AFU interrupt.”h]”hŒ*Free a previously allocated AFU interrupt.”…””}”(hjBhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h·hŸh¶h K—hj>ubah}”(h]”h ]”h"]”h$]”h&]”uh1jðhŸh¶h K—hjÑhžhubh¸)”}”(hŒOCXL_IOCTL_IRQ_SET_FD:”h]”hŒOCXL_IOCTL_IRQ_SET_FD:”…””}”(hjVhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h·hŸh¶h K™hjÑhžhubjñ)”}”(hŒtAssociate an event fd to an AFU interrupt so that the user process can be notified when the AFU sends an interrupt. ”h]”h¸)”}”(hŒsAssociate an event fd to an AFU interrupt so that the user process can be notified when the AFU sends an interrupt.”h]”hŒsAssociate an event fd to an AFU interrupt so that the user process can be notified when the AFU sends an interrupt.”…””}”(hjhhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h·hŸh¶h K›hjdubah}”(h]”h ]”h"]”h$]”h&]”uh1jðhŸh¶h K›hjÑhžhubh¸)”}”(hŒOCXL_IOCTL_GET_METADATA:”h]”hŒOCXL_IOCTL_GET_METADATA:”…””}”(hj|hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h·hŸh¶h KžhjÑhžhubjñ)”}”(hŒ‰Obtains configuration information from the card, such at the size of MMIO areas, the AFU version, and the PASID for the current context. ”h]”h¸)”}”(hŒˆObtains configuration information from the card, such at the size of MMIO areas, the AFU version, and the PASID for the current context.”h]”hŒˆObtains configuration information from the card, such at the size of MMIO areas, the AFU version, and the PASID for the current context.”…””}”(hjŽhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h·hŸh¶h K hjŠubah}”(h]”h ]”h"]”h$]”h&]”uh1jðhŸh¶h K hjÑhžhubh¸)”}”(hŒOCXL_IOCTL_ENABLE_P9_WAIT:”h]”hŒOCXL_IOCTL_ENABLE_P9_WAIT:”…””}”(hj¢hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h·hŸh¶h K£hjÑhžhubjñ)”}”(hŒ«Allows the AFU to wake a userspace thread executing 'wait'. Returns information to userspace to allow it to configure the AFU. Note that this is only available on POWER9. ”h]”h¸)”}”(hŒªAllows the AFU to wake a userspace thread executing 'wait'. Returns information to userspace to allow it to configure the AFU. Note that this is only available on POWER9.”h]”hŒ®Allows the AFU to wake a userspace thread executing ‘wait’. Returns information to userspace to allow it to configure the AFU. Note that this is only available on POWER9.”…””}”(hj´hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h·hŸh¶h K¥hj°ubah}”(h]”h ]”h"]”h$]”h&]”uh1jðhŸh¶h K¥hjÑhžhubh¸)”}”(hŒOCXL_IOCTL_GET_FEATURES:”h]”hŒOCXL_IOCTL_GET_FEATURES:”…””}”(hjÈhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h·hŸh¶h K©hjÑhžhubjñ)”}”(hŒOReports on which CPU features that affect OpenCAPI are usable from userspace. ”h]”h¸)”}”(hŒMReports on which CPU features that affect OpenCAPI are usable from userspace.”h]”hŒMReports on which CPU features that affect OpenCAPI are usable from userspace.”…””}”(hjÚhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h·hŸh¶h K«hjÖubah}”(h]”h ]”h"]”h$]”h&]”uh1jðhŸh¶h K«hjÑhžhubeh}”(h]”Œioctl”ah ]”h"]”Œioctl”ah$]”h&]”uh1h¡hj™hžhhŸh¶h KŠubh¢)”}”(hhh]”(h§)”}”(hŒmmap”h]”hŒmmap”…””}”(hjùhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¦hjöhžhhŸh¶h K°ubh¸)”}”(hŒKA process can mmap the per-process MMIO area for interactions with the AFU.”h]”hŒKA process can mmap the per-process MMIO area for interactions with the AFU.”…””}”(hjhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h·hŸh¶h K²hjöhžhubeh}”(h]”Œmmap”ah ]”h"]”Œmmap”ah$]”h&]”uh1h¡hj™hžhhŸh¶h K°ubeh}”(h]”Œuser-api”ah ]”h"]”Œuser api”ah$]”h&]”uh1h¡hh£hžhhŸh¶h K~ubeh}”(h]”Œ6opencapi-open-coherent-accelerator-processor-interface”ah ]”h"]”Œ8opencapi (open coherent accelerator processor interface)”ah$]”h&]”uh1h¡hhhžhhŸh¶h Kubeh}”(h]”h ]”h"]”h$]”h&]”Œsource”h¶uh1hŒcurrent_source”NŒ current_line”NŒsettings”Œdocutils.frontend”ŒValues”“”)”}”(h¦NŒ generator”NŒ datestamp”NŒ source_link”NŒ source_url”NŒ toc_backlinks”Œentry”Œfootnote_backlinks”KŒ sectnum_xform”KŒstrip_comments”NŒstrip_elements_with_classes”NŒ strip_classes”NŒ report_level”KŒ halt_level”KŒexit_status_level”KŒdebug”NŒwarning_stream”NŒ traceback”ˆŒinput_encoding”Œ utf-8-sig”Œinput_encoding_error_handler”Œstrict”Œoutput_encoding”Œutf-8”Œoutput_encoding_error_handler”jPŒerror_encoding”Œutf-8”Œerror_encoding_error_handler”Œbackslashreplace”Œ language_code”Œen”Œrecord_dependencies”NŒconfig”NŒ id_prefix”hŒauto_id_prefix”Œid”Œ dump_settings”NŒdump_internals”NŒdump_transforms”NŒdump_pseudo_xml”NŒexpose_internals”NŒstrict_visitor”NŒ_disable_config”NŒ_source”h¶Œ _destination”NŒ _config_files”]”Œ7/var/lib/git/docbuild/linux/Documentation/docutils.conf”aŒfile_insertion_enabled”ˆŒ raw_enabled”KŒline_length_limit”M'Œpep_references”NŒ pep_base_url”Œhttps://peps.python.org/”Œpep_file_url_template”Œpep-%04d”Œrfc_references”NŒ rfc_base_url”Œ&https://datatracker.ietf.org/doc/html/”Œ tab_width”KŒtrim_footnote_reference_space”‰Œsyntax_highlight”Œlong”Œ smart_quotes”ˆŒsmartquotes_locales”]”Œcharacter_level_inline_markup”‰Œdoctitle_xform”‰Œ docinfo_xform”KŒsectsubtitle_xform”‰Œ image_loading”Œlink”Œembed_stylesheet”‰Œcloak_email_addresses”ˆŒsection_self_link”‰Œenv”NubŒreporter”NŒindirect_targets”]”Œsubstitution_defs”}”Œsubstitution_names”}”Œrefnames”}”Œrefids”}”Œnameids”}”(j*j'hîhëjOjLj’jj÷jôj,j)jojlj–j“j"jjÎjËjójðjjuŒ nametypes”}”(j*‰hîˆjO‰j’‰j÷‰j,‰jo‰j–‰j"‰jΉjó‰j‰uh}”(j'h£hëhåjLjjjRjôj•j)jújlj/j“jrjj™jËjªjðjÑjjöuŒ footnote_refs”}”Œ citation_refs”}”Œ autofootnotes”]”Œautofootnote_refs”]”Œsymbol_footnotes”]”Œsymbol_footnote_refs”]”Œ footnotes”]”Œ citations”]”Œautofootnote_start”KŒsymbol_footnote_start”KŒ id_counter”Œ collections”ŒCounter”“”}”…”R”Œparse_messages”]”Œtransform_messages”]”Œ transformer”NŒ include_log”]”Œ decoration”Nhžhub.