[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 22/32] ACPI: Add IORT Structure definition
From: |
Peter Maydell |
Subject: |
[Qemu-devel] [PULL 22/32] ACPI: Add IORT Structure definition |
Date: |
Mon, 24 Oct 2016 18:25:18 +0100 |
From: Prem Mallappa <address@hidden>
ACPI Spec 6.0 introduces IO Remapping Table Structure. This patch
introduces the definitions required to describe the IO relationship
between the PCIe root complex and the ITS.
This conforms to:
"IO Remapping Table System Software on ARM Platforms",
Document number: ARM DEN 0049B, October 2015.
Signed-off-by: Prem Mallappa <address@hidden>
Signed-off-by: Eric Auger <address@hidden>
Reviewed-by: Andrew Jones <address@hidden>
Message-id: address@hidden
Signed-off-by: Peter Maydell <address@hidden>
---
include/hw/acpi/acpi-defs.h | 68 +++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 68 insertions(+)
diff --git a/include/hw/acpi/acpi-defs.h b/include/hw/acpi/acpi-defs.h
index 9c1b7cb..90a5353 100644
--- a/include/hw/acpi/acpi-defs.h
+++ b/include/hw/acpi/acpi-defs.h
@@ -609,4 +609,72 @@ typedef struct AcpiDmarHardwareUnit AcpiDmarHardwareUnit;
/* Masks for Flags field above */
#define ACPI_DMAR_INCLUDE_PCI_ALL 1
+/*
+ * Input Output Remapping Table (IORT)
+ * Conforms to "IO Remapping Table System Software on ARM Platforms",
+ * Document number: ARM DEN 0049B, October 2015
+ */
+
+struct AcpiIortTable {
+ ACPI_TABLE_HEADER_DEF /* ACPI common table header */
+ uint32_t node_count;
+ uint32_t node_offset;
+ uint32_t reserved;
+} QEMU_PACKED;
+typedef struct AcpiIortTable AcpiIortTable;
+
+/*
+ * IORT node types
+ */
+
+#define ACPI_IORT_NODE_HEADER_DEF /* Node format common fields */ \
+ uint8_t type; \
+ uint16_t length; \
+ uint8_t revision; \
+ uint32_t reserved; \
+ uint32_t mapping_count; \
+ uint32_t mapping_offset;
+
+/* Values for node Type above */
+enum {
+ ACPI_IORT_NODE_ITS_GROUP = 0x00,
+ ACPI_IORT_NODE_NAMED_COMPONENT = 0x01,
+ ACPI_IORT_NODE_PCI_ROOT_COMPLEX = 0x02,
+ ACPI_IORT_NODE_SMMU = 0x03,
+ ACPI_IORT_NODE_SMMU_V3 = 0x04
+};
+
+struct AcpiIortIdMapping {
+ uint32_t input_base;
+ uint32_t id_count;
+ uint32_t output_base;
+ uint32_t output_reference;
+ uint32_t flags;
+} QEMU_PACKED;
+typedef struct AcpiIortIdMapping AcpiIortIdMapping;
+
+struct AcpiIortMemoryAccess {
+ uint32_t cache_coherency;
+ uint8_t hints;
+ uint16_t reserved;
+ uint8_t memory_flags;
+} QEMU_PACKED;
+typedef struct AcpiIortMemoryAccess AcpiIortMemoryAccess;
+
+struct AcpiIortItsGroup {
+ ACPI_IORT_NODE_HEADER_DEF
+ uint32_t its_count;
+ uint32_t identifiers[0];
+} QEMU_PACKED;
+typedef struct AcpiIortItsGroup AcpiIortItsGroup;
+
+struct AcpiIortRC {
+ ACPI_IORT_NODE_HEADER_DEF
+ AcpiIortMemoryAccess memory_properties;
+ uint32_t ats_attribute;
+ uint32_t pci_segment_number;
+ AcpiIortIdMapping id_mapping_array[0];
+} QEMU_PACKED;
+typedef struct AcpiIortRC AcpiIortRC;
+
#endif
--
2.7.4
- [Qemu-devel] [PULL 00/32] target-arm queue, Peter Maydell, 2016/10/24
- [Qemu-devel] [PULL 01/32] migration: Remove static allocation of xzblre cache buffer, Peter Maydell, 2016/10/24
- [Qemu-devel] [PULL 20/32] arm_mptimer: Convert to use ptimer, Peter Maydell, 2016/10/24
- [Qemu-devel] [PULL 23/32] ARM: Virt: ACPI: Build an IORT table with RC and ITS nodes, Peter Maydell, 2016/10/24
- [Qemu-devel] [PULL 22/32] ACPI: Add IORT Structure definition,
Peter Maydell <=
- [Qemu-devel] [PULL 29/32] hw/arm: QOM'ify strongarm.c, Peter Maydell, 2016/10/24
- [Qemu-devel] [PULL 30/32] hw/display: QOM'ify pl110.c, Peter Maydell, 2016/10/24
- [Qemu-devel] [PULL 16/32] hw/ptimer: Add "no counter round down" policy, Peter Maydell, 2016/10/24
- [Qemu-devel] [PULL 27/32] hw/arm: QOM'ify musicpal.c, Peter Maydell, 2016/10/24
- [Qemu-devel] [PULL 24/32] timer: a9gtimer: remove loop to auto-increment comparator, Peter Maydell, 2016/10/24
- [Qemu-devel] [PULL 12/32] hw/ptimer: Add "no immediate trigger" policy, Peter Maydell, 2016/10/24
- [Qemu-devel] [PULL 14/32] hw/ptimer: Add "no immediate reload" policy, Peter Maydell, 2016/10/24
- [Qemu-devel] [PULL 07/32] hw/arm/virt: Set minimum_page_bits to 12, Peter Maydell, 2016/10/24
- [Qemu-devel] [PULL 11/32] tests: ptimer: Add tests for "continuous trigger" policy, Peter Maydell, 2016/10/24
- [Qemu-devel] [PULL 06/32] target-arm: Make page size a runtime setting, Peter Maydell, 2016/10/24