[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH RFCv1 04/10] hw/arm/virt: Add an SMMU_IO_LEN macro
From: |
Nicolin Chen |
Subject: |
[PATCH RFCv1 04/10] hw/arm/virt: Add an SMMU_IO_LEN macro |
Date: |
Tue, 25 Jun 2024 17:28:31 -0700 |
A following patch will add a new MMIO region for nested SMMU instances.
This macro will be repeatedly used to set offsets and MMIO sizes in both
virt and virt-acpi-build.
Signed-off-by: Nicolin Chen <nicolinc@nvidia.com>
---
hw/arm/virt.c | 2 +-
include/hw/arm/virt.h | 3 +++
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/hw/arm/virt.c b/hw/arm/virt.c
index be3d8b0ce6..ef59c79ca3 100644
--- a/hw/arm/virt.c
+++ b/hw/arm/virt.c
@@ -170,7 +170,7 @@ static const MemMapEntry base_memmap[] = {
[VIRT_FW_CFG] = { 0x09020000, 0x00000018 },
[VIRT_GPIO] = { 0x09030000, 0x00001000 },
[VIRT_SECURE_UART] = { 0x09040000, 0x00001000 },
- [VIRT_SMMU] = { 0x09050000, 0x00020000 },
+ [VIRT_SMMU] = { 0x09050000, SMMU_IO_LEN },
[VIRT_PCDIMM_ACPI] = { 0x09070000, MEMORY_HOTPLUG_IO_LEN },
[VIRT_ACPI_GED] = { 0x09080000, ACPI_GED_EVT_SEL_LEN },
[VIRT_NVDIMM_ACPI] = { 0x09090000, NVDIMM_ACPI_IO_LEN},
diff --git a/include/hw/arm/virt.h b/include/hw/arm/virt.h
index e0c07527c4..b35c4f62d7 100644
--- a/include/hw/arm/virt.h
+++ b/include/hw/arm/virt.h
@@ -48,6 +48,9 @@
/* See Linux kernel arch/arm64/include/asm/pvclock-abi.h */
#define PVTIME_SIZE_PER_CPU 64
+/* MMIO region size for SMMUv3 */
+#define SMMU_IO_LEN (0x20000)
+
enum {
VIRT_FLASH,
VIRT_MEM,
--
2.43.0
- [PATCH RFCv1 00/10] hw/arm/virt: Add multiple nested SMMUs, Nicolin Chen, 2024/06/25
- [PATCH RFCv1 01/10] hw/arm/virt-acpi-build: Add IORT RMR regions to handle MSI nested binding, Nicolin Chen, 2024/06/25
- [PATCH RFCv1 02/10] hw/arm/virt: Add iommufd link to virt-machine, Nicolin Chen, 2024/06/25
- [PATCH RFCv1 03/10] hw/arm/virt: Get the number of host-level SMMUv3 instances, Nicolin Chen, 2024/06/25
- [PATCH RFCv1 06/10] hw/arm/virt: Assign vfio-pci devices to nested SMMUs, Nicolin Chen, 2024/06/25
- [PATCH RFCv1 05/10] hw/arm/virt: Add VIRT_NESTED_SMMU, Nicolin Chen, 2024/06/25
- [PATCH RFCv1 07/10] hw/arm/virt: Bypass iommu for default PCI bus, Nicolin Chen, 2024/06/25
- [PATCH RFCv1 09/10] hw/arm/virt-acpi-build: Build IORT with multiple SMMU nodes, Nicolin Chen, 2024/06/25
- [PATCH RFCv1 04/10] hw/arm/virt: Add an SMMU_IO_LEN macro,
Nicolin Chen <=
- [PATCH RFCv1 10/10] hw/arm/virt-acpi-build: Enable ATS for nested SMMUv3, Nicolin Chen, 2024/06/25
- [PATCH RFCv1 08/10] hw/arm/virt-acpi-build: Handle reserved bus number of pxb buses, Nicolin Chen, 2024/06/25