diff options
author | Arthur Heymans <arthur@aheymans.xyz> | 2023-06-19 10:48:13 +0200 |
---|---|---|
committer | Felix Held <felix-coreboot@felixheld.de> | 2023-06-20 12:16:06 +0000 |
commit | bafe55c36fec131c4b2512ba908aa0fbeb3f5ae3 (patch) | |
tree | 740cdbcd47c514f32ee246e1fda25fd7bee832b1 /src/soc/amd/common | |
parent | 2eaa25a9d376ea7ebfc5befda8729956645e7b16 (diff) |
soc/amd/common/iommu: Use preprocessor values for IOMMU base
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Change-Id: I85f58565bf1f955f704e223d538d0b374bc6fbda
Reviewed-on: https://review.coreboot.org/c/coreboot/+/75915
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Fred Reitberger <reitbergerfred@gmail.com>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
Diffstat (limited to 'src/soc/amd/common')
-rw-r--r-- | src/soc/amd/common/block/iommu/iommu.c | 5 |
1 files changed, 4 insertions, 1 deletions
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 <device/pci.h> #include <lib.h> +#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); |