Felix Held has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/83343?usp=email )
Change subject: soc/amd/common/acpi/ivrs: use PCI_DEVFN macro ......................................................................
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 felix-coreboot@felixheld.de Change-Id: I7b7949ad3524790e7d7d527c488a32e785f55bc0 --- M src/soc/amd/common/block/acpi/ivrs.c 1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/43/83343/1
diff --git a/src/soc/amd/common/block/acpi/ivrs.c b/src/soc/amd/common/block/acpi/ivrs.c index a2f7715..451a6c0 100644 --- a/src/soc/amd/common/block/acpi/ivrs.c +++ b/src/soc/amd/common/block/acpi/ivrs.c @@ -332,7 +332,7 @@ ivhd->length = sizeof(struct acpi_ivrs_ivhd);
/* BDF <bus>: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);