From 43ed6972e6d505307165c1c9990d7ce0b9eec239 Mon Sep 17 00:00:00 2001 From: Felix Held Date: Wed, 3 Jul 2024 20:40:36 +0200 Subject: soc/amd/common/acpi/ivrs: use PCI_DEVFN macro Use the PCI_DEVFN macro to make the calculation of the ivhd->device_id value a bit clearer. TEST=Timeless build results in identical binary for Mandolin Signed-off-by: Felix Held Change-Id: I7b7949ad3524790e7d7d527c488a32e785f55bc0 Reviewed-on: https://review.coreboot.org/c/coreboot/+/83343 Reviewed-by: Matt DeVillier Tested-by: build bot (Jenkins) --- src/soc/amd/common/block/acpi/ivrs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/soc/amd/common') diff --git a/src/soc/amd/common/block/acpi/ivrs.c b/src/soc/amd/common/block/acpi/ivrs.c index a2f77150c9..451a6c0879 100644 --- a/src/soc/amd/common/block/acpi/ivrs.c +++ b/src/soc/amd/common/block/acpi/ivrs.c @@ -332,7 +332,7 @@ static unsigned long acpi_fill_ivrs(acpi_ivrs_t *ivrs, unsigned long current) ivhd->length = sizeof(struct acpi_ivrs_ivhd); /* BDF :00.2 */ - ivhd->device_id = 0x02 | (nb_dev->upstream->secondary << 8); + ivhd->device_id = PCI_DEVFN(0, 2) | (nb_dev->upstream->secondary << 8); ivhd->capability_offset = pci_find_capability(iommu_dev, IOMMU_CAP_ID); ivhd->iommu_base_low = pci_read_config32(iommu_dev, IOMMU_CAP_BASE_LO) & 0xffffc000; ivhd->iommu_base_high = pci_read_config32(iommu_dev, IOMMU_CAP_BASE_HI); -- cgit v1.2.3