diff options
author | Kyösti Mälkki <kyosti.malkki@gmail.com> | 2023-04-09 13:47:28 +0300 |
---|---|---|
committer | Kyösti Mälkki <kyosti.malkki@gmail.com> | 2023-04-14 03:03:23 +0000 |
commit | ef9c2922d24b3a031d2fcfc3b596faaec8ad7389 (patch) | |
tree | 4d6414db3f8dc39082e882490d2afac5200e28bf /src/soc/amd | |
parent | d1534e41e4172b121122b2802d45028b61234279 (diff) |
soc/amd: Clarify ACPI _PRT entry generation
The reference to a constant FCH IOAPIC interrupt count used
with GNB IOAPIC was a bit obscure.
Change-Id: I2d862e37424f9fea7f269cd09e9e90056531b643
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/74314
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
Diffstat (limited to 'src/soc/amd')
-rw-r--r-- | src/soc/amd/common/block/pci/acpi_prt.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/soc/amd/common/block/pci/acpi_prt.c b/src/soc/amd/common/block/pci/acpi_prt.c index c142f57567..f748024de9 100644 --- a/src/soc/amd/common/block/pci/acpi_prt.c +++ b/src/soc/amd/common/block/pci/acpi_prt.c @@ -7,20 +7,22 @@ #include <arch/ioapic.h> #include <device/device.h> +/* GNB IO-APIC is located after the FCH IO-APIC */ +#define FCH_IOAPIC_INTERRUPTS 24 +#define GNB_GSI_BASE FCH_IOAPIC_INTERRUPTS + static void acpigen_write_PRT_GSI(const struct pci_routing_info *routing_info) { unsigned int irq; acpigen_write_package(4); /* Package - APIC Routing */ for (unsigned int i = 0; i < 4; ++i) { - /* GNB IO-APIC is located after the FCH IO-APIC */ - irq = IO_APIC_INTERRUPTS; - irq += pci_calculate_irq(routing_info, i); + irq = pci_calculate_irq(routing_info, i); acpigen_write_PRT_GSI_entry( 0, /* There is only one device attached to the bridge */ i, /* pin */ - irq); + GNB_GSI_BASE + irq); } acpigen_pop_len(); /* Package - APIC Routing */ } |