Attention is currently required from: Patrick Rudolph. Tim Wawrzynczak has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/51158 )
Change subject: sb/intel/common: Use new acpigen_write_PRT_*_entry functions ......................................................................
sb/intel/common: Use new acpigen_write_PRT_*_entry functions
Signed-off-by: Tim Wawrzynczak twawrzynczak@chromium.org Change-Id: I9f573b9bd40260ab963c5a4a965a6ac483af91ec --- M src/southbridge/intel/common/acpi_pirq_gen.c 1 file changed, 7 insertions(+), 10 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/58/51158/1
diff --git a/src/southbridge/intel/common/acpi_pirq_gen.c b/src/southbridge/intel/common/acpi_pirq_gen.c index 6100be8..04edcf6 100644 --- a/src/southbridge/intel/common/acpi_pirq_gen.c +++ b/src/southbridge/intel/common/acpi_pirq_gen.c @@ -1,6 +1,7 @@ /* SPDX-License-Identifier: GPL-2.0-only */
#include <acpi/acpigen.h> +#include <acpi/acpigen_pci.h> #include <console/console.h> #include <device/pci_def.h> #include <device/pci_ops.h> @@ -52,20 +53,16 @@ pirq = pci_int_mapping[pci_dev][int_pin]; if (pirq == PIRQ_NONE) continue; - acpigen_write_package(4); - acpigen_write_dword((pci_dev << 16) | 0xffff); - acpigen_write_byte(int_pin); + if (emit == EMIT_APIC) { - acpigen_write_zero(); - acpigen_write_dword(16 + pirq - PIRQ_A); + const unsigned int gsi = 16 + pirq - PIRQ_A; + acpigen_write_PRT_GSI_entry(pci_dev, int_pin, gsi); } else { snprintf(buffer, sizeof(buffer), - "%s.LNK%c", - lpcb_path, 'A' + pirq - PIRQ_A); - acpigen_emit_namestring(buffer); - acpigen_write_dword(0); + "%s.LNK%c", + lpcb_path, 'A' + pirq - PIRQ_A); + acpigen_write_PRT_source_entry(pci_dev, int_pin, buffer, 0); } - acpigen_pop_len(); } } }