linux-acpi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Erik Kaneda <erik.kaneda@intel.com>
To: "Rafael J . Wysocki" <rafael@kernel.org>,
	ACPI Devel Maling List <linux-acpi@vger.kernel.org>
Cc: Jean-Philippe Brucker <jean-philippe@linaro.org>,
	Bob Moore <robert.moore@intel.com>,
	Erik Kaneda <erik.kaneda@intel.com>
Subject: [PATCH v2 13/22] ACPICA: iASL: Add definitions for the VIOT table
Date: Tue,  6 Apr 2021 14:30:19 -0700	[thread overview]
Message-ID: <20210406213028.718796-14-erik.kaneda@intel.com> (raw)
In-Reply-To: <20210406213028.718796-1-erik.kaneda@intel.com>

From: Jean-Philippe Brucker <jean-philippe@linaro.org>

ACPICA commit fc4e33319c1ee08f20f5c44853dd8426643f6dfd

Add definitions for the VIOT table and its subtables.

Link: https://github.com/acpica/acpica/commit/fc4e3331
Signed-off-by: Jean-Philippe Brucker <jean-philippe@linaro.org>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Erik Kaneda <erik.kaneda@intel.com>
---
 include/acpi/actbl3.h | 66 +++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 66 insertions(+)

diff --git a/include/acpi/actbl3.h b/include/acpi/actbl3.h
index bf61a70deb22..e9bd7ce65f7c 100644
--- a/include/acpi/actbl3.h
+++ b/include/acpi/actbl3.h
@@ -33,6 +33,7 @@
 #define ACPI_SIG_TCPA           "TCPA"	/* Trusted Computing Platform Alliance table */
 #define ACPI_SIG_TPM2           "TPM2"	/* Trusted Platform Module 2.0 H/W interface table */
 #define ACPI_SIG_UEFI           "UEFI"	/* Uefi Boot Optimization Table */
+#define ACPI_SIG_VIOT           "VIOT"	/* Virtual I/O Translation Table */
 #define ACPI_SIG_WAET           "WAET"	/* Windows ACPI Emulated devices Table */
 #define ACPI_SIG_WDAT           "WDAT"	/* Watchdog Action Table */
 #define ACPI_SIG_WDDT           "WDDT"	/* Watchdog Timer Description Table */
@@ -484,6 +485,71 @@ struct acpi_table_uefi {
 	u16 data_offset;	/* Offset of remaining data in table */
 };
 
+/*******************************************************************************
+ *
+ * VIOT - Virtual I/O Translation Table
+ *        Version 1
+ *
+ ******************************************************************************/
+
+struct acpi_table_viot {
+	struct acpi_table_header header;	/* Common ACPI table header */
+	u16 node_count;
+	u16 node_offset;
+	u8 reserved[8];
+};
+
+/* VIOT subtable header */
+
+struct acpi_viot_header {
+	u8 type;
+	u8 reserved;
+	u16 length;
+};
+
+/* Values for Type field above */
+
+enum acpi_viot_node_type {
+	ACPI_VIOT_NODE_PCI_RANGE = 0x01,
+	ACPI_VIOT_NODE_MMIO = 0x02,
+	ACPI_VIOT_NODE_VIRTIO_IOMMU_PCI = 0x03,
+	ACPI_VIOT_NODE_VIRTIO_IOMMU_MMIO = 0x04,
+};
+
+/* VIOT subtables */
+
+struct acpi_viot_pci_range {
+	ACPI_VIOT_HEADER header;
+	u32 endpoint_start;
+	u16 segment_start;
+	u16 segment_end;
+	u16 bdf_start;
+	u16 bdf_end;
+	u16 output_node;
+	u8 reserved[6];
+};
+
+struct acpi_viot_mmio {
+	ACPI_VIOT_HEADER header;
+	u32 endpoint;
+	u64 base_address;
+	u16 output_node;
+	u8 reserved[6];
+};
+
+struct acpi_viot_virtio_iommu_pci {
+	ACPI_VIOT_HEADER header;
+	u16 segment;
+	u16 bdf;
+	u8 reserved[8];
+};
+
+struct acpi_viot_virtio_iommu_mmio {
+	ACPI_VIOT_HEADER header;
+	u8 reserved[4];
+	u64 base_address;
+};
+
 /*******************************************************************************
  *
  * WAET - Windows ACPI Emulated devices Table
-- 
2.29.2


  parent reply	other threads:[~2021-04-06 22:05 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-06 21:30 [PATCH v2 00/22] ACPICA release 20210331 (ACPI 6.4 support) Erik Kaneda
2021-04-06 21:30 ` [PATCH v2 01/22] ACPICA: Add parsing for IVRS IVHD 40h and device entry F0h Erik Kaneda
2021-04-06 21:30 ` [PATCH v2 02/22] ACPICA: ACPI 6.4: Add new predefined objects _BPC, _BPS, and _BPT Erik Kaneda
2021-04-06 21:30 ` [PATCH v2 03/22] ACPICA: ACPI 6.4: add USB4 capabilities UUID Erik Kaneda
2021-04-06 21:30 ` [PATCH v2 04/22] ACPICA: ACPI 6.4: add CXL ACPI device ID and _CBR object Erik Kaneda
2021-04-06 21:30 ` [PATCH v2 05/22] ACPICA: ACPI 6.4: MADT: add Multiprocessor Wakeup Structure Erik Kaneda
2021-04-06 21:30 ` [PATCH v2 06/22] ACPICA: ACPI 6.4: PCCT: add support for subtable type 5 Erik Kaneda
2021-04-06 21:30 ` [PATCH v2 07/22] ACPICA: ACPI 6.4: PPTT: add new version of subtable type 1 Erik Kaneda
2021-04-06 21:30 ` [PATCH v2 08/22] ACPICA: Tree-wide: fix various typos and spelling mistakes Erik Kaneda
2021-04-06 21:30 ` [PATCH v2 09/22] ACPICA: ACPI 6.4: NFIT: add Location Cookie field Erik Kaneda
2021-04-06 21:30 ` [PATCH v2 10/22] ACPICA: ACPI 6.4: HMAT: add new fields/flags Erik Kaneda
2021-04-06 21:30 ` [PATCH v2 11/22] ACPICA: ACPI 6.4: Add new flags in SRAT Erik Kaneda
2021-04-06 21:30 ` [PATCH v2 12/22] ACPICA: ACPI 6.4: add SDEV secure access components Erik Kaneda
2021-04-06 21:30 ` Erik Kaneda [this message]
2021-04-06 21:30 ` [PATCH v2 14/22] ACPICA: CXL 2.0: CEDT: Add new CEDT table Erik Kaneda
2021-04-06 21:30 ` [PATCH v2 15/22] ACPICA: ACPI 6.4: PMTT: add new fields/structures Erik Kaneda
2021-04-06 21:30 ` [PATCH v2 16/22] ACPICA: ACPI 6.4: add CSI2Bus resource template Erik Kaneda
2021-04-06 21:30 ` [PATCH v2 17/22] ACPICA: ACPI 6.4: add support for PHAT table Erik Kaneda
2021-04-06 21:30 ` [PATCH v2 18/22] ACPICA: iASL: Add support for CEDT table Erik Kaneda
2021-04-06 21:30 ` [PATCH v2 19/22] ACPICA: iASL: Decode subtable type field for VIOT Erik Kaneda
2021-04-06 21:30 ` [PATCH v2 20/22] ACPICA: acpisrc: Add missing conversion for VIOT support Erik Kaneda
2021-04-06 21:30 ` [PATCH v2 21/22] ACPICA: IORT: Updates for revision E.b Erik Kaneda
2021-04-06 21:30 ` [PATCH v2 22/22] ACPICA: Update version to 20210331 Erik Kaneda
2021-04-07 17:11 ` [PATCH v2 00/22] ACPICA release 20210331 (ACPI 6.4 support) Rafael J. Wysocki

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210406213028.718796-14-erik.kaneda@intel.com \
    --to=erik.kaneda@intel.com \
    --cc=jean-philippe@linaro.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=rafael@kernel.org \
    --cc=robert.moore@intel.com \
    --subject='Re: [PATCH v2 13/22] ACPICA: iASL: Add definitions for the VIOT table' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).