|
31 | 31 | #define ACPI_SIG_CDAT "CDAT" /* Coherent Device Attribute Table */ |
32 | 32 | #define ACPI_SIG_ERDT "ERDT" /* Enhanced Resource Director Technology */ |
33 | 33 | #define ACPI_SIG_IORT "IORT" /* IO Remapping Table */ |
| 34 | +#define ACPI_SIG_IOVT "IOVT" /* I/O Virtualization Table */ |
34 | 35 | #define ACPI_SIG_IVRS "IVRS" /* I/O Virtualization Reporting Structure */ |
35 | 36 | #define ACPI_SIG_KEYP "KEYP" /* Key Programming Interface for IDE */ |
36 | 37 | #define ACPI_SIG_LPIT "LPIT" /* Low Power Idle Table */ |
@@ -859,6 +860,73 @@ struct acpi_iort_rmr_desc { |
859 | 860 | u32 reserved; |
860 | 861 | }; |
861 | 862 |
|
| 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 | + |
862 | 930 | /******************************************************************************* |
863 | 931 | * |
864 | 932 | * IVRS - I/O Virtualization Reporting Structure |
|
0 commit comments