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>
This commit is contained in:
Arthur Heymans 2023-06-19 10:48:13 +02:00 committed by Felix Held
parent 2eaa25a9d3
commit bafe55c36f
1 changed files with 4 additions and 1 deletions

View File

@ -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);