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 Reviewed-on: https://review.coreboot.org/c/coreboot/+/83343 Reviewed-by: Matt DeVillier <matt.devillier@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
@@ -332,7 +332,7 @@ static unsigned long acpi_fill_ivrs(acpi_ivrs_t *ivrs, unsigned long current)
|
|||||||
ivhd->length = sizeof(struct acpi_ivrs_ivhd);
|
ivhd->length = sizeof(struct acpi_ivrs_ivhd);
|
||||||
|
|
||||||
/* BDF <bus>:00.2 */
|
/* 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->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_low = pci_read_config32(iommu_dev, IOMMU_CAP_BASE_LO) & 0xffffc000;
|
||||||
ivhd->iommu_base_high = pci_read_config32(iommu_dev, IOMMU_CAP_BASE_HI);
|
ivhd->iommu_base_high = pci_read_config32(iommu_dev, IOMMU_CAP_BASE_HI);
|
||||||
|
Reference in New Issue
Block a user