1 /* SPDX-License-Identifier: BSD-3-Clause
3 * Copyright (c) 2015-2016 Freescale Semiconductor, Inc. All rights reserved.
4 * Copyright 2016,2019 NXP
11 #include <rte_compat.h>
14 /* Pathname of FSL-MC devices directory. */
15 #define SYSFS_FSL_MC_DEVICES "/sys/bus/fsl-mc/devices"
16 #define DPAA2_MC_DPNI_DEVID 7
17 #define DPAA2_MC_DPSECI_DEVID 3
18 #define DPAA2_MC_DPCON_DEVID 5
19 #define DPAA2_MC_DPIO_DEVID 9
20 #define DPAA2_MC_DPBP_DEVID 10
21 #define DPAA2_MC_DPCI_DEVID 11
23 typedef struct fslmc_vfio_device {
24 int fd; /* fslmc root container device ?? */
25 int index; /*index of child object */
26 struct fslmc_vfio_device *child; /* Child object */
29 typedef struct fslmc_vfio_group {
30 int fd; /* /dev/vfio/"groupid" */
32 struct fslmc_vfio_container *container;
34 struct fslmc_vfio_device *vfio_device;
37 typedef struct fslmc_vfio_container {
38 int fd; /* /dev/vfio/vfio */
40 int index; /* index in group list */
41 struct fslmc_vfio_group *group;
42 } fslmc_vfio_container;
44 extern char *fslmc_container;
47 int rte_dpaa2_intr_enable(struct rte_intr_handle *intr_handle, int index);
50 int rte_dpaa2_intr_disable(struct rte_intr_handle *intr_handle, int index);
52 int rte_dpaa2_vfio_setup_intr(struct rte_intr_handle *intr_handle,
56 int fslmc_vfio_setup_group(void);
57 int fslmc_vfio_process_group(void);
58 char *fslmc_get_container(void);
59 int fslmc_get_container_group(int *gropuid);
60 int rte_fslmc_vfio_dmamap(void);
62 int rte_fslmc_vfio_mem_dmamap(uint64_t vaddr, uint64_t iova, uint64_t size);
64 #endif /* _FSLMC_VFIO_H_ */