- bullseye 1.7-2+b1
|CXL_AFU_ATTACH_FULL(3)||CXL Programmer's Manual||CXL_AFU_ATTACH_FULL(3)|
cxl_afu_attach_full - attach the calling process's memory to an open AFU
int cxl_afu_attach_full(struct cxl_afu_h *afu, __u64 wed, __u16 num_interrupts, __u64 amr);
cxl_afu_attach_full() attaches a context of afu to the current process, specifies wed as the initial work element descriptor, requests num_interrupts, sets the authority mask register amr, and starts the AFU context.
On success, all memory mapped into this process is accessible to the AFU context using the same effective addresses. No additional calls are required to map/unmap memory. The AFU memory context will be updated as userspace allocates and frees memory.
The work element descriptor wed is a 64-bit argument defined by the AFU. Typically this is an effective address pointing to an AFU specific structure describing what work to perform.
The number of requested userspace interrupts num_interrupts must be in the range defined by cxl_get_irqs_min() and cxl_get_irqs_max().
The authority mask register amr is the same as the powerpc AMR.
On success, 0 is returned. On error, -1 is returned and errno is set appropriately.
cxl(3), cxl_afu_attach(3), cxl_afu_attach_work(3), cxl_afu_fd_to_h(3), cxl_afu_free(3), cxl_afu_open_dev(3), cxl_afu_opened(3), cxl_get_irqs_max(3), cxl_get_irqs_min(3), cxl_get_prefault_mode(3), cxl_mmio_map(3), cxl_set_irqs_max(3), cxl_set_mode(3), cxl_set_prefault_mode(3)