CXL_GET_MMIO_SIZE(3)

NAME
cxl_get_mmio_size - get the total size of the MMIO space of an AFU, including all per-process areas

cxl_get_mmio_size - get the size of the MMIO space available to a non-master process

SYNOPSIS
#include <libcxl.h>

int cxl_get_mmio_size(struct cxl_afu_h *afu, long *valp);

DESCRIPTION
cxl_get_mmio_size() copies the size of the MMIO space of afu to the long integer pointed to by valp.

In AFU directed mode, the master context MMIO space includes all slave context per-process MMIO areas. In slave context, cxl_get_mmio_size() returns the size of the per-process MMIO space.

RETURN VALUE
On success, 0 is returned. On error, -1 is returned and errno is set appropriately.

ERRORS

EINVAL
    Invalid argument value.

ENODEV
    Invalid AFU device.

ENOMEM
    Insufficient memory.

FILES

/dev/cxl/afu<i>.<j>d
    AFU device in dedicated process mode.

/dev/cxl/afu<i>.<j>m
    AFU device in AFU directed mode, master context.

/dev/cxl/afu<i>.<j>s
    AFU device in AFU directed mode, slave context.

SEE ALSO
cxl(3), cxl_adapter_afu_next(3), cxl_afu_next(3), cxl_mmio_map(3), cxl_mmio_ptr(3), cxl_mmio_read32(3), cxl_mmio_read64(3), cxl_mmio_unmap(3), cxl_mmio_write32(3), cxl_mmio_write64(3)