diff options
author | Michał Żygowski <michal.zygowski@3mdeb.com> | 2020-04-02 17:55:39 +0200 |
---|---|---|
committer | Michał Żygowski <michal.zygowski@3mdeb.com> | 2020-04-06 09:33:01 +0000 |
commit | e8d483923baed00fbc16de38e6532f4cc27cdc9b (patch) | |
tree | 0745f1dc49d97a57f909de6700c30a083929e9e9 /src | |
parent | a0e72c48679ac83fd476af79d26faea07788d402 (diff) |
arch/x86/acpi: add definitions for IVHD type 11h
Add definitions of I/O Virtualization Hardware Definition Block
type 11h structures for ACPI I/O Virtualization Reporting Structure
generation.
Signed-off-by: Michał Żygowski <michal.zygowski@3mdeb.com>
Change-Id: I698ac6f6a2e0bc5736fbb14ef583bbe031baee28
Reviewed-on: https://review.coreboot.org/c/coreboot/+/40041
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: HAOUAS Elyes <ehaouas@noos.fr>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src')
-rw-r--r-- | src/arch/x86/include/arch/acpi.h | 27 | ||||
-rw-r--r-- | src/arch/x86/include/arch/acpi_ivrs.h | 33 |
2 files changed, 60 insertions, 0 deletions
diff --git a/src/arch/x86/include/arch/acpi.h b/src/arch/x86/include/arch/acpi.h index d5040adb24..644f52f2ce 100644 --- a/src/arch/x86/include/arch/acpi.h +++ b/src/arch/x86/include/arch/acpi.h @@ -290,6 +290,33 @@ typedef struct acpi_ivrs { struct acpi_ivrs_ivhd ivhd; } __packed acpi_ivrs_t; +/* IVHD Type 11h IOMMU Attributes */ +typedef struct ivhd11_iommu_attr { + uint32_t reserved1 : 13; + uint32_t perf_counters : 4; + uint32_t perf_counter_banks : 6; + uint32_t msi_num_ppr : 5; + uint32_t reserved2 : 4; +} __packed ivhd11_iommu_attr_t; + +/* IVRS IVHD (I/O Virtualization Hardware Definition Block) Type 11h */ +typedef struct acpi_ivrs_ivhd_11 { + uint8_t type; + uint8_t flags; + uint16_t length; + uint16_t device_id; + uint16_t capability_offset; + uint32_t iommu_base_low; + uint32_t iommu_base_high; + uint16_t pci_segment_group; + uint16_t iommu_info; + struct ivhd11_iommu_attr iommu_attributes; + uint32_t efr_reg_image_low; + uint32_t efr_reg_image_high; + uint32_t reserved[2]; + uint8_t entry[0]; +} __packed acpi_ivrs_ivhd11_t; + enum dev_scope_type { SCOPE_PCI_ENDPOINT = 1, SCOPE_PCI_SUB = 2, diff --git a/src/arch/x86/include/arch/acpi_ivrs.h b/src/arch/x86/include/arch/acpi_ivrs.h index d8d62d47b5..83abfb63dc 100644 --- a/src/arch/x86/include/arch/acpi_ivrs.h +++ b/src/arch/x86/include/arch/acpi_ivrs.h @@ -107,4 +107,37 @@ #define IVHD_UID_INT 0x01 #define IVHD_UID_STRING 0x02 +/* IVHD (I/O Virtualization Hardware Definition Block) 4-byte entry */ +typedef struct ivrs_ivhd_generic { + uint8_t type; + uint16_t dev_id; + uint8_t dte_setting; +} __packed ivrs_ivhd_generic_t; + +/* IVHD (I/O Virtualization Hardware Definition Block) 8-byte entries */ +typedef struct ivrs_ivhd_alias { + uint8_t type; + uint16_t dev_id; + uint8_t dte_setting; + uint8_t reserved1; + uint16_t source_dev_id; + uint8_t reserved2; +} __packed ivrs_ivhd_alias_t; + +typedef struct ivrs_ivhd_extended { + uint8_t type; + uint16_t dev_id; + uint8_t dte_setting; + uint32_t extended_dte_setting; +} __packed ivrs_ivhd_extended_t; + +typedef struct ivrs_ivhd_special { + uint8_t type; + uint16_t reserved; + uint8_t dte_setting; + uint8_t handle; + uint16_t source_dev_id; + uint8_t variety; +} __packed ivrs_ivhd_special_t; + #endif |