mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 08:13:54 -06:00
qtest/riscv-iommu-test: add init queues test
Add an additional test to further exercise the IOMMU where we attempt to initialize the command, fault and page-request queues. These steps are taken from chapter 6.2 of the RISC-V IOMMU spec, "Guidelines for initialization". It emulates what we expect from the software/OS when initializing the IOMMU. Signed-off-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com> Reviewed-by: Frank Chang <frank.chang@sifive.com> Acked-by: Alistair Francis <alistair.francis@wdc.com> Message-ID: <20241016204038.649340-12-dbarboza@ventanamicro.com> Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
This commit is contained in:
parent
a7aa525b93
commit
d4f7804bac
2 changed files with 155 additions and 0 deletions
|
@ -62,6 +62,36 @@
|
|||
|
||||
#define RISCV_IOMMU_REG_IPSR 0x0054
|
||||
|
||||
#define RISCV_IOMMU_REG_IVEC 0x02F8
|
||||
#define RISCV_IOMMU_REG_IVEC_CIV GENMASK_ULL(3, 0)
|
||||
#define RISCV_IOMMU_REG_IVEC_FIV GENMASK_ULL(7, 4)
|
||||
#define RISCV_IOMMU_REG_IVEC_PMIV GENMASK_ULL(11, 8)
|
||||
#define RISCV_IOMMU_REG_IVEC_PIV GENMASK_ULL(15, 12)
|
||||
|
||||
#define RISCV_IOMMU_REG_CQB 0x0018
|
||||
#define RISCV_IOMMU_CQB_PPN_START 10
|
||||
#define RISCV_IOMMU_CQB_PPN_LEN 44
|
||||
#define RISCV_IOMMU_CQB_LOG2SZ_START 0
|
||||
#define RISCV_IOMMU_CQB_LOG2SZ_LEN 5
|
||||
|
||||
#define RISCV_IOMMU_REG_CQT 0x0024
|
||||
|
||||
#define RISCV_IOMMU_REG_FQB 0x0028
|
||||
#define RISCV_IOMMU_FQB_PPN_START 10
|
||||
#define RISCV_IOMMU_FQB_PPN_LEN 44
|
||||
#define RISCV_IOMMU_FQB_LOG2SZ_START 0
|
||||
#define RISCV_IOMMU_FQB_LOG2SZ_LEN 5
|
||||
|
||||
#define RISCV_IOMMU_REG_FQT 0x0034
|
||||
|
||||
#define RISCV_IOMMU_REG_PQB 0x0038
|
||||
#define RISCV_IOMMU_PQB_PPN_START 10
|
||||
#define RISCV_IOMMU_PQB_PPN_LEN 44
|
||||
#define RISCV_IOMMU_PQB_LOG2SZ_START 0
|
||||
#define RISCV_IOMMU_PQB_LOG2SZ_LEN 5
|
||||
|
||||
#define RISCV_IOMMU_REG_PQT 0x0044
|
||||
|
||||
typedef struct QRISCVIOMMU {
|
||||
QOSGraphObject obj;
|
||||
QPCIDevice dev;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue