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