Michał Żygowski has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/40041 )
Change subject: arch/x86/acpi: add definitions for IVHD type 11h ......................................................................
arch/x86/acpi: add definitions for IVHD type 11h
Signed-off-by: Michał Żygowski michal.zygowski@3mdeb.com Change-Id: I698ac6f6a2e0bc5736fbb14ef583bbe031baee28 --- M src/arch/x86/include/arch/acpi.h M src/arch/x86/include/arch/acpi_ivrs.h 2 files changed, 60 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/41/40041/1
diff --git a/src/arch/x86/include/arch/acpi.h b/src/arch/x86/include/arch/acpi.h index d5040ad..644f52f 100644 --- a/src/arch/x86/include/arch/acpi.h +++ b/src/arch/x86/include/arch/acpi.h @@ -290,6 +290,33 @@ 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 d8d62d4..83abfb6 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
HAOUAS Elyes has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/40041 )
Change subject: arch/x86/acpi: add definitions for IVHD type 11h ......................................................................
Patch Set 1: Code-Review+1
(1 comment)
https://review.coreboot.org/c/coreboot/+/40041/1/src/arch/x86/include/arch/a... File src/arch/x86/include/arch/acpi.h:
https://review.coreboot.org/c/coreboot/+/40041/1/src/arch/x86/include/arch/a... PS1, Line 295: 13; not documented in "48882—Rev 3.05-PUB—Jan 2020" we write on reserved?
Paul Menzel has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/40041 )
Change subject: arch/x86/acpi: add definitions for IVHD type 11h ......................................................................
Patch Set 1:
(1 comment)
https://review.coreboot.org/c/coreboot/+/40041/1//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/40041/1//COMMIT_MSG@8 PS1, Line 8: Please add a short note, what IVHD is.
The I/O Virtualization Hardware Definition Block …
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/40041 )
Change subject: arch/x86/acpi: add definitions for IVHD type 11h ......................................................................
Patch Set 1: Code-Review+2
Hello build bot (Jenkins), Angel Pons, HAOUAS Elyes,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/40041
to look at the new patch set (#2).
Change subject: arch/x86/acpi: add definitions for IVHD type 11h ......................................................................
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 --- M src/arch/x86/include/arch/acpi.h M src/arch/x86/include/arch/acpi_ivrs.h 2 files changed, 60 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/41/40041/2
Michał Żygowski has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/40041 )
Change subject: arch/x86/acpi: add definitions for IVHD type 11h ......................................................................
Patch Set 2:
(1 comment)
https://review.coreboot.org/c/coreboot/+/40041/1/src/arch/x86/include/arch/a... File src/arch/x86/include/arch/acpi.h:
https://review.coreboot.org/c/coreboot/+/40041/1/src/arch/x86/include/arch/a... PS1, Line 295: 13;
not documented in "48882—Rev 3.05-PUB—Jan 2020" […]
See https://www.amd.com/system/files/TechDocs/48882_IOMMU_3.05_PUB.pdf Table 87: IVHD Type 11h IOMMU Attributes
Michał Żygowski has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/40041 )
Change subject: arch/x86/acpi: add definitions for IVHD type 11h ......................................................................
Patch Set 2:
(1 comment)
https://review.coreboot.org/c/coreboot/+/40041/1//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/40041/1//COMMIT_MSG@8 PS1, Line 8:
Please add a short note, what IVHD is. […]
Done
Paul Menzel has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/40041 )
Change subject: arch/x86/acpi: add definitions for IVHD type 11h ......................................................................
Patch Set 2: Code-Review+1
HAOUAS Elyes has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/40041 )
Change subject: arch/x86/acpi: add definitions for IVHD type 11h ......................................................................
Patch Set 2: Code-Review+2
Michał Żygowski has submitted this change. ( https://review.coreboot.org/c/coreboot/+/40041 )
Change subject: arch/x86/acpi: add definitions for IVHD type 11h ......................................................................
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 --- M src/arch/x86/include/arch/acpi.h M src/arch/x86/include/arch/acpi_ivrs.h 2 files changed, 60 insertions(+), 0 deletions(-)
Approvals: build bot (Jenkins): Verified Paul Menzel: Looks good to me, but someone else must approve HAOUAS Elyes: Looks good to me, approved Angel Pons: Looks good to me, approved
diff --git a/src/arch/x86/include/arch/acpi.h b/src/arch/x86/include/arch/acpi.h index d5040ad..644f52f 100644 --- a/src/arch/x86/include/arch/acpi.h +++ b/src/arch/x86/include/arch/acpi.h @@ -290,6 +290,33 @@ 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 d8d62d4..83abfb6 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
9elements QA has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/40041 )
Change subject: arch/x86/acpi: add definitions for IVHD type 11h ......................................................................
Patch Set 3:
Automatic boot test returned (PASS/FAIL/TOTAL): 3/0/3 Emulation targets: EMULATION_QEMU_X86_Q35 using payload TianoCore : SUCCESS : https://lava.9esec.io/r/2110 EMULATION_QEMU_X86_Q35 using payload SeaBIOS : SUCCESS : https://lava.9esec.io/r/2109 EMULATION_QEMU_X86_I440FX using payload SeaBIOS : SUCCESS : https://lava.9esec.io/r/2108
Please note: This test is under development and might not be accurate at all!