14cc87010SRuslan Bukin /*- 24cc87010SRuslan Bukin * SPDX-License-Identifier: BSD-2-Clause 34cc87010SRuslan Bukin * 44cc87010SRuslan Bukin * Copyright (c) 2020 Ruslan Bukin <br@bsdpad.com> 54cc87010SRuslan Bukin * 64cc87010SRuslan Bukin * This software was developed by SRI International and the University of 74cc87010SRuslan Bukin * Cambridge Computer Laboratory (Department of Computer Science and 84cc87010SRuslan Bukin * Technology) under DARPA contract HR0011-18-C-0016 ("ECATS"), as part of the 94cc87010SRuslan Bukin * DARPA SSITH research programme. 104cc87010SRuslan Bukin * 114cc87010SRuslan Bukin * Redistribution and use in source and binary forms, with or without 124cc87010SRuslan Bukin * modification, are permitted provided that the following conditions 134cc87010SRuslan Bukin * are met: 144cc87010SRuslan Bukin * 1. Redistributions of source code must retain the above copyright 154cc87010SRuslan Bukin * notice, this list of conditions and the following disclaimer. 164cc87010SRuslan Bukin * 2. Redistributions in binary form must reproduce the above copyright 174cc87010SRuslan Bukin * notice, this list of conditions and the following disclaimer in the 184cc87010SRuslan Bukin * documentation and/or other materials provided with the distribution. 194cc87010SRuslan Bukin * 204cc87010SRuslan Bukin * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 214cc87010SRuslan Bukin * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 224cc87010SRuslan Bukin * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 234cc87010SRuslan Bukin * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 244cc87010SRuslan Bukin * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 254cc87010SRuslan Bukin * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 264cc87010SRuslan Bukin * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 274cc87010SRuslan Bukin * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 284cc87010SRuslan Bukin * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 294cc87010SRuslan Bukin * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 304cc87010SRuslan Bukin * SUCH DAMAGE. 314cc87010SRuslan Bukin */ 324cc87010SRuslan Bukin 334cc87010SRuslan Bukin #ifndef _ARM64_IOMMU_IOMMU_H_ 344cc87010SRuslan Bukin #define _ARM64_IOMMU_IOMMU_H_ 354cc87010SRuslan Bukin 364cc87010SRuslan Bukin #define IOMMU_PAGE_SIZE 4096 374cc87010SRuslan Bukin #define IOMMU_PAGE_MASK (IOMMU_PAGE_SIZE - 1) 384cc87010SRuslan Bukin 394cc87010SRuslan Bukin int iommu_unregister(struct iommu_unit *unit); 404cc87010SRuslan Bukin int iommu_register(struct iommu_unit *unit); 41*41ce5498SRuslan Bukin struct iommu_ctx * iommu_get_ctx_ofw(device_t dev, int channel); 424cc87010SRuslan Bukin 434cc87010SRuslan Bukin #endif /* _ARM64_IOMMU_IOMMU_H_ */ 44