1 /* SPDX-License-Identifier: BSD-3-Clause
3 * Copyright (c) 2015-2016 Freescale Semiconductor, Inc. All rights reserved.
4 * Copyright 2016,2019 NXP
13 /* Pathname of FSL-MC devices directory. */
14 #define SYSFS_FSL_MC_DEVICES "/sys/bus/fsl-mc/devices"
15 #define DPAA2_MC_DPNI_DEVID 7
16 #define DPAA2_MC_DPSECI_DEVID 3
17 #define DPAA2_MC_DPCON_DEVID 5
18 #define DPAA2_MC_DPIO_DEVID 9
19 #define DPAA2_MC_DPBP_DEVID 10
20 #define DPAA2_MC_DPCI_DEVID 11
22 typedef struct fslmc_vfio_device {
23 int fd; /* fslmc root container device ?? */
24 int index; /*index of child object */
25 struct fslmc_vfio_device *child; /* Child object */
28 typedef struct fslmc_vfio_group {
29 int fd; /* /dev/vfio/"groupid" */
31 struct fslmc_vfio_container *container;
33 struct fslmc_vfio_device *vfio_device;
36 typedef struct fslmc_vfio_container {
37 int fd; /* /dev/vfio/vfio */
39 int index; /* index in group list */
40 struct fslmc_vfio_group *group;
41 } fslmc_vfio_container;
43 extern char *fslmc_container;
44 int rte_dpaa2_intr_enable(struct rte_intr_handle *intr_handle, int index);
45 int rte_dpaa2_intr_disable(struct rte_intr_handle *intr_handle, int index);
47 int rte_dpaa2_vfio_setup_intr(struct rte_intr_handle *intr_handle,
51 int fslmc_vfio_setup_group(void);
52 int fslmc_vfio_process_group(void);
53 char *fslmc_get_container(void);
54 int fslmc_get_container_group(int *gropuid);
55 int rte_fslmc_vfio_dmamap(void);
57 int rte_fslmc_vfio_mem_dmamap(uint64_t vaddr, uint64_t iova, uint64_t size);
59 #endif /* _FSLMC_VFIO_H_ */