xref: /openbmc/qemu/include/hw/riscv/iommu.h (revision feb58e3b)
1 /*
2  * QEMU emulation of an RISC-V IOMMU
3  *
4  * Copyright (C) 2022-2023 Rivos Inc.
5  *
6  * This program is free software; you can redistribute it and/or modify it
7  * under the terms and conditions of the GNU General Public License,
8  * version 2 or later, as published by the Free Software Foundation.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License along
16  * with this program; if not, see <http://www.gnu.org/licenses/>.
17  */
18 
19 #ifndef HW_RISCV_IOMMU_H
20 #define HW_RISCV_IOMMU_H
21 
22 #include "qemu/osdep.h"
23 #include "qom/object.h"
24 
25 #define TYPE_RISCV_IOMMU "riscv-iommu"
26 OBJECT_DECLARE_SIMPLE_TYPE(RISCVIOMMUState, RISCV_IOMMU)
27 typedef struct RISCVIOMMUState RISCVIOMMUState;
28 
29 #define TYPE_RISCV_IOMMU_MEMORY_REGION "riscv-iommu-mr"
30 typedef struct RISCVIOMMUSpace RISCVIOMMUSpace;
31 
32 #define TYPE_RISCV_IOMMU_PCI "riscv-iommu-pci"
33 OBJECT_DECLARE_SIMPLE_TYPE(RISCVIOMMUStatePci, RISCV_IOMMU_PCI)
34 typedef struct RISCVIOMMUStatePci RISCVIOMMUStatePci;
35 
36 #endif
37