Felix Held has submitted this change. ( https://review.coreboot.org/c/coreboot/+/75828?usp=email )
Change subject: soc/amd/*: Use proper resource function to declare GNB IOAPICs ......................................................................
soc/amd/*: Use proper resource function to declare GNB IOAPICs
Signed-off-by: Arthur Heymans arthur@aheymans.xyz Change-Id: I296697d579b9ad8e35b22ada939a74a5ef6d6f61 Reviewed-on: https://review.coreboot.org/c/coreboot/+/75828 Reviewed-by: Felix Held felix-coreboot@felixheld.de Tested-by: build bot (Jenkins) no-reply@coreboot.org --- M src/soc/amd/cezanne/root_complex.c M src/soc/amd/glinda/root_complex.c M src/soc/amd/mendocino/root_complex.c M src/soc/amd/phoenix/root_complex.c M src/soc/amd/picasso/root_complex.c 5 files changed, 5 insertions(+), 25 deletions(-)
Approvals: build bot (Jenkins): Verified Felix Held: Looks good to me, approved
diff --git a/src/soc/amd/cezanne/root_complex.c b/src/soc/amd/cezanne/root_complex.c index b5bf62c..8483922 100644 --- a/src/soc/amd/cezanne/root_complex.c +++ b/src/soc/amd/cezanne/root_complex.c @@ -107,7 +107,6 @@ unsigned int idx = 0; const struct hob_header *hob_iterator; const struct hob_resource *res; - struct resource *gnb_apic;
uintptr_t early_reserved_dram_start, early_reserved_dram_end; const struct memmap_early_dram *e = memmap_get_early_dram_usage(); @@ -147,10 +146,7 @@ mmconf_resource(dev, idx++);
/* GNB IOAPIC resource */ - gnb_apic = new_resource(dev, IOMMU_IOAPIC_IDX); - gnb_apic->base = GNB_IO_APIC_ADDR; - gnb_apic->size = 0x00001000; - gnb_apic->flags = IORESOURCE_MEM | IORESOURCE_ASSIGNED | IORESOURCE_FIXED; + mmio_range(dev, IOMMU_IOAPIC_IDX, GNB_IO_APIC_ADDR, 0x1000);
/* Reserve fixed IOMMU MMIO region */ mmio_range(dev, idx++, IOMMU_RESERVED_MMIO_BASE, IOMMU_RESERVED_MMIO_SIZE); diff --git a/src/soc/amd/glinda/root_complex.c b/src/soc/amd/glinda/root_complex.c index 1794d08..470dd49 100644 --- a/src/soc/amd/glinda/root_complex.c +++ b/src/soc/amd/glinda/root_complex.c @@ -122,7 +122,6 @@ unsigned int idx = 0; const struct hob_header *hob_iterator; const struct hob_resource *res; - struct resource *gnb_apic;
uintptr_t early_reserved_dram_start, early_reserved_dram_end; const struct memmap_early_dram *e = memmap_get_early_dram_usage(); @@ -162,10 +161,7 @@ mmconf_resource(dev, idx++);
/* GNB IOAPIC resource */ - gnb_apic = new_resource(dev, IOMMU_IOAPIC_IDX); - gnb_apic->base = GNB_IO_APIC_ADDR; - gnb_apic->size = 0x00001000; - gnb_apic->flags = IORESOURCE_MEM | IORESOURCE_ASSIGNED | IORESOURCE_FIXED; + mmio_range(dev, IOMMU_IOAPIC_IDX, GNB_IO_APIC_ADDR, 0x1000);
/* Reserve fixed IOMMU MMIO region */ mmio_range(dev, idx++, IOMMU_RESERVED_MMIO_BASE, IOMMU_RESERVED_MMIO_SIZE); diff --git a/src/soc/amd/mendocino/root_complex.c b/src/soc/amd/mendocino/root_complex.c index 0dcf2b8..5e1e11a 100644 --- a/src/soc/amd/mendocino/root_complex.c +++ b/src/soc/amd/mendocino/root_complex.c @@ -150,7 +150,6 @@ unsigned int idx = 0; const struct hob_header *hob_iterator; const struct hob_resource *res; - struct resource *gnb_apic;
uintptr_t early_reserved_dram_start, early_reserved_dram_end; const struct memmap_early_dram *e = memmap_get_early_dram_usage(); @@ -190,10 +189,7 @@ mmconf_resource(dev, idx++);
/* GNB IOAPIC resource */ - gnb_apic = new_resource(dev, IOMMU_IOAPIC_IDX); - gnb_apic->base = GNB_IO_APIC_ADDR; - gnb_apic->size = 0x00001000; - gnb_apic->flags = IORESOURCE_MEM | IORESOURCE_ASSIGNED | IORESOURCE_FIXED; + mmio_range(dev, IOMMU_IOAPIC_IDX, GNB_IO_APIC_ADDR, 0x1000);
/* Reserve fixed IOMMU MMIO region */ mmio_range(dev, idx++, IOMMU_RESERVED_MMIO_BASE, IOMMU_RESERVED_MMIO_SIZE); diff --git a/src/soc/amd/phoenix/root_complex.c b/src/soc/amd/phoenix/root_complex.c index a75de50..999df58 100644 --- a/src/soc/amd/phoenix/root_complex.c +++ b/src/soc/amd/phoenix/root_complex.c @@ -122,7 +122,6 @@ unsigned int idx = 0; const struct hob_header *hob_iterator; const struct hob_resource *res; - struct resource *gnb_apic;
uintptr_t early_reserved_dram_start, early_reserved_dram_end; const struct memmap_early_dram *e = memmap_get_early_dram_usage(); @@ -162,10 +161,7 @@ mmconf_resource(dev, idx++);
/* GNB IOAPIC resource */ - gnb_apic = new_resource(dev, IOMMU_IOAPIC_IDX); - gnb_apic->base = GNB_IO_APIC_ADDR; - gnb_apic->size = 0x00001000; - gnb_apic->flags = IORESOURCE_MEM | IORESOURCE_ASSIGNED | IORESOURCE_FIXED; + mmio_range(dev, IOMMU_IOAPIC_IDX, GNB_IO_APIC_ADDR, 0x1000);
/* Reserve fixed IOMMU MMIO region */ mmio_range(dev, idx++, IOMMU_RESERVED_MMIO_BASE, IOMMU_RESERVED_MMIO_SIZE); diff --git a/src/soc/amd/picasso/root_complex.c b/src/soc/amd/picasso/root_complex.c index bf36f6dd..27f2fcf 100644 --- a/src/soc/amd/picasso/root_complex.c +++ b/src/soc/amd/picasso/root_complex.c @@ -107,7 +107,6 @@ unsigned int idx = 0; const struct hob_header *hob_iterator; const struct hob_resource *res; - struct resource *gnb_apic;
uintptr_t early_reserved_dram_start, early_reserved_dram_end; const struct memmap_early_dram *e = memmap_get_early_dram_usage(); @@ -145,10 +144,7 @@ mmconf_resource(dev, idx++);
/* GNB IOAPIC resource */ - gnb_apic = new_resource(dev, IOMMU_IOAPIC_IDX); - gnb_apic->base = GNB_IO_APIC_ADDR; - gnb_apic->size = 0x00001000; - gnb_apic->flags = IORESOURCE_MEM | IORESOURCE_ASSIGNED | IORESOURCE_FIXED; + mmio_range(dev, IOMMU_IOAPIC_IDX, GNB_IO_APIC_ADDR, 0x1000);
/* Reserve fixed IOMMU MMIO region */ mmio_range(dev, idx++, IOMMU_RESERVED_MMIO_BASE, IOMMU_RESERVED_MMIO_SIZE);