|
libocxl
|
The AFU getter functions provide access to AFU metadata, such as the identifier, paths, and PASID. More...
Functions | |
| uint32_t | ocxl_afu_get_pasid (ocxl_afu_h afu) |
| Get the PASID for the currently open context. | |
| const ocxl_identifier * | ocxl_afu_get_identifier (ocxl_afu_h afu) |
| Get the identifier of the AFU. | |
| const char * | ocxl_afu_get_device_path (ocxl_afu_h afu) |
| Get the canonical device path of the AFU. | |
| const char * | ocxl_afu_get_sysfs_path (ocxl_afu_h afu) |
| Get the canonical sysfs path of the AFU. | |
| void | ocxl_afu_get_version (ocxl_afu_h afu, uint8_t *major, uint8_t *minor) |
| Get the version of the AFU. | |
The AFU getter functions provide access to AFU metadata, such as the identifier, paths, and PASID.
These operate on any valid AFU handle, even if it has not been opened.
| const char * ocxl_afu_get_device_path | ( | ocxl_afu_h | afu | ) |
Get the canonical device path of the AFU.
Returns the 'true' device path of the AFU from (within /dev), which may or may not be the same as the path passed to the library. It will differ when the specified path is a symlink or duplicate device.
| afu | The AFU to get the device path of |
| const ocxl_identifier * ocxl_afu_get_identifier | ( | ocxl_afu_h | afu | ) |
| uint32_t ocxl_afu_get_pasid | ( | ocxl_afu_h | afu | ) |
Get the PASID for the currently open context.
While not commonly used, some AFU implementations may need their PASID written back to MMIO registers, or shared with other AFUs.
| afu | the AFU instance to get the PASID of |
| UINT32_MAX | if the context has not been attached |
| const char * ocxl_afu_get_sysfs_path | ( | ocxl_afu_h | afu | ) |
| void ocxl_afu_get_version | ( | ocxl_afu_h | afu, |
| uint8_t * | major, | ||
| uint8_t * | minor ) |
Get the version of the AFU.
Returns the version of the AFU, as specified by the AFU implementation. See Section 4.3.3.1 AFU Descriptor Template 0 of the OpenCAPI Data Link Specification Offset 0x1C, AFU Version Major/Minor.
| afu | The AFU to get the sysfs path of | |
| [out] | major | the major version number |
| [out] | minor | the minor version number |