diff options
author | Felix Held <felix-coreboot@felixheld.de> | 2024-07-03 20:40:36 +0200 |
---|---|---|
committer | Felix Held <felix-coreboot@felixheld.de> | 2024-07-04 19:47:29 +0000 |
commit | 43ed6972e6d505307165c1c9990d7ce0b9eec239 (patch) | |
tree | 4a8a07aa626e6ebf709bc9d8806eab61993b5ee0 /src/soc/amd | |
parent | a786d28c723ba9b61ed412380b56d5dd57f79cc2 (diff) |
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>
Diffstat (limited to 'src/soc/amd')
-rw-r--r-- | src/soc/amd/common/block/acpi/ivrs.c | 2 |
1 files changed, 1 insertions, 1 deletions
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 <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); |