Skip to content

Commit 75c3b2d

Browse files
lixianglairafaeljw
authored andcommitted
ACPICA: iASL: Add definitions for the IOVT table
Add definitions for the IOVT table and its subtables. Link: acpica/acpica@14c0def532ac Signed-off-by: Xianglai Li <lixianglai@loongson.cn> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Link: https://patch.msgid.link/2031013.PYKUYFuaPT@rafael.j.wysocki
1 parent 78ebefd commit 75c3b2d

1 file changed

Lines changed: 68 additions & 0 deletions

File tree

include/acpi/actbl2.h

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
#define ACPI_SIG_CDAT "CDAT" /* Coherent Device Attribute Table */
3232
#define ACPI_SIG_ERDT "ERDT" /* Enhanced Resource Director Technology */
3333
#define ACPI_SIG_IORT "IORT" /* IO Remapping Table */
34+
#define ACPI_SIG_IOVT "IOVT" /* I/O Virtualization Table */
3435
#define ACPI_SIG_IVRS "IVRS" /* I/O Virtualization Reporting Structure */
3536
#define ACPI_SIG_KEYP "KEYP" /* Key Programming Interface for IDE */
3637
#define ACPI_SIG_LPIT "LPIT" /* Low Power Idle Table */
@@ -859,6 +860,73 @@ struct acpi_iort_rmr_desc {
859860
u32 reserved;
860861
};
861862

863+
/*******************************************************************************
864+
*
865+
* IOVT - I/O Virtualization Table
866+
*
867+
* Conforms to "LoongArch I/O Virtualization Table",
868+
* Version 0.1, October 2024
869+
*
870+
******************************************************************************/
871+
872+
struct acpi_table_iovt {
873+
struct acpi_table_header header; /* Common ACPI table header */
874+
u16 iommu_count;
875+
u16 iommu_offset;
876+
u8 reserved[8];
877+
};
878+
879+
/* IOVT subtable header */
880+
881+
struct acpi_iovt_header {
882+
u16 type;
883+
u16 length;
884+
};
885+
886+
/* Values for Type field above */
887+
888+
enum acpi_iovt_iommu_type {
889+
ACPI_IOVT_IOMMU_V1 = 0x00,
890+
ACPI_IOVT_IOMMU_RESERVED = 0x01 /* 1 and greater are reserved */
891+
};
892+
893+
/* IOVT subtables */
894+
895+
struct acpi_iovt_iommu {
896+
struct acpi_iovt_header header;
897+
u32 flags;
898+
u16 segment;
899+
u16 phy_width; /* Physical Address Width */
900+
u16 virt_width; /* Virtual Address Width */
901+
u16 max_page_level;
902+
u64 page_size;
903+
u32 device_id;
904+
u64 base_address;
905+
u32 address_space_size;
906+
u8 interrupt_type;
907+
u8 reserved[3];
908+
u32 gsi_number;
909+
u32 proximity_domain;
910+
u32 max_device_num;
911+
u32 device_entry_num;
912+
u32 device_entry_offset;
913+
};
914+
915+
struct acpi_iovt_device_entry {
916+
u8 type;
917+
u8 length;
918+
u8 flags;
919+
u8 reserved[3];
920+
u16 device_id;
921+
};
922+
923+
enum acpi_iovt_device_entry_type {
924+
ACPI_IOVT_DEVICE_ENTRY_SINGLE = 0x00,
925+
ACPI_IOVT_DEVICE_ENTRY_START = 0x01,
926+
ACPI_IOVT_DEVICE_ENTRY_END = 0x02,
927+
ACPI_IOVT_DEVICE_ENTRY_RESERVED = 0x03 /* 3 and greater are reserved */
928+
};
929+
862930
/*******************************************************************************
863931
*
864932
* IVRS - I/O Virtualization Reporting Structure

0 commit comments

Comments
 (0)