From bafe55c36fec131c4b2512ba908aa0fbeb3f5ae3 Mon Sep 17 00:00:00 2001 From: Arthur Heymans Date: Mon, 19 Jun 2023 10:48:13 +0200 Subject: [PATCH] soc/amd/common/iommu: Use preprocessor values for IOMMU base Signed-off-by: Arthur Heymans Change-Id: I85f58565bf1f955f704e223d538d0b374bc6fbda Reviewed-on: https://review.coreboot.org/c/coreboot/+/75915 Tested-by: build bot (Jenkins) Reviewed-by: Fred Reitberger Reviewed-by: Felix Held --- src/soc/amd/common/block/iommu/iommu.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/soc/amd/common/block/iommu/iommu.c b/src/soc/amd/common/block/iommu/iommu.c index 52861f2af7..ad1d774baf 100644 --- a/src/soc/amd/common/block/iommu/iommu.c +++ b/src/soc/amd/common/block/iommu/iommu.c @@ -4,6 +4,9 @@ #include #include +#define IOMMU_CAP_BASE_LO 0x44 +#define IOMMU_CAP_BASE_HI 0x48 + static void iommu_read_resources(struct device *dev) { struct resource *res; @@ -12,7 +15,7 @@ static void iommu_read_resources(struct device *dev) pci_dev_read_resources(dev); /* IOMMU MMIO registers */ - res = new_resource(dev, 0x44); + res = new_resource(dev, IOMMU_CAP_BASE_LO); res->size = 512 * KiB; res->align = log2(res->size); res->gran = log2(res->size);