soc/amd/common/block/acpi/ivrs: fix missing IOAPIC[1] error

When probing the resource with the IOMMU_IOAPIC_IDX index, we need to
use the PCI device 0 function 0 on the first bus in the domain for
probing and not the domain device, since the resource isn't on the
domain device, but on the northbridge device which is B0F0D0 in the case
of the APUs.

TEST=This fixes the following error on Mandolin with Picasso:

AMD-Vi: [Firmware Bug]: : IOAPIC[1] not in IVRS table
AMD-Vi: Disabling interrupt remapping

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: Id88f17d68ba5accef6561837478828bd3d24baa5
Reviewed-on: https://review.coreboot.org/c/coreboot/+/76117
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Fred Reitberger <reitbergerfred@gmail.com>
This commit is contained in:
Felix Held 2023-06-26 22:58:59 +02:00
parent 90464073e4
commit e33d253793
1 changed files with 2 additions and 1 deletions

View File

@ -181,7 +181,8 @@ static unsigned long acpi_ivhd_misc(unsigned long current, struct device *dev)
add_ivhd_device_entries(NULL, dev, 0, -1, &root_level, add_ivhd_device_entries(NULL, dev, 0, -1, &root_level,
&current, dev->link_list->secondary); &current, dev->link_list->secondary);
res = probe_resource(dev, IOMMU_IOAPIC_IDX); res = probe_resource(pcidev_path_behind(dev->link_list, PCI_DEVFN(0, 0)),
IOMMU_IOAPIC_IDX);
if (res) { if (res) {
/* Describe IOAPIC associated with the IOMMU */ /* Describe IOAPIC associated with the IOMMU */
current = acpi_fill_ivrs_ioapic(current, (u8 *)(uintptr_t)res->base, current = acpi_fill_ivrs_ioapic(current, (u8 *)(uintptr_t)res->base,