1 /*
2  * This program is free software; you can redistribute it and/or modify it
3  * under the terms and conditions of the GNU General Public License,
4  * version 2, as published by the Free Software Foundation.
5  *
6  * This program is distributed in the hope it will be useful, but WITHOUT
7  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
8  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
9  * more details.
10  *
11  * You should have received a copy of the GNU General Public License along with
12  * this program; If not, see <http://www.gnu.org/licenses/>.
13 */
14 #ifndef __ARCH_ARM_IOMMU_H__
15 #define __ARCH_ARM_IOMMU_H__
16 
17 struct arch_iommu
18 {
19     /* Private information for the IOMMU drivers */
20     void *priv;
21 };
22 
23 const struct iommu_ops *iommu_get_ops(void);
24 void iommu_set_ops(const struct iommu_ops *ops);
25 
26 /*
27  * The mapping helpers below should only be used if P2M Table is shared
28  * between the CPU and the IOMMU.
29  */
30 int __must_check arm_iommu_map_page(struct domain *d, dfn_t dfn, mfn_t mfn,
31                                     unsigned int flags,
32                                     unsigned int *flush_flags);
33 int __must_check arm_iommu_unmap_page(struct domain *d, dfn_t dfn,
34                                       unsigned int *flush_flags);
35 
36 #endif /* __ARCH_ARM_IOMMU_H__ */
37 
38 /*
39  * Local variables:
40  * mode: C
41  * c-file-style: "BSD"
42  * c-basic-offset: 4
43  * indent-tabs-mode: nil
44  * End:
45  */
46