Arthur Heymans has uploaded this change for review. ( 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 --- 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(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/28/75828/1
diff --git a/src/soc/amd/cezanne/root_complex.c b/src/soc/amd/cezanne/root_complex.c index 29070f6..5931c67 100644 --- a/src/soc/amd/cezanne/root_complex.c +++ b/src/soc/amd/cezanne/root_complex.c @@ -106,7 +106,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(); @@ -146,10 +145,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);
if (fsp_hob_iterator_init(&hob_iterator) != CB_SUCCESS) { printk(BIOS_ERR, "%s incomplete because no HOB list was found\n", diff --git a/src/soc/amd/glinda/root_complex.c b/src/soc/amd/glinda/root_complex.c index b18e948..200c30c 100644 --- a/src/soc/amd/glinda/root_complex.c +++ b/src/soc/amd/glinda/root_complex.c @@ -121,7 +121,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(); @@ -161,10 +160,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);
if (fsp_hob_iterator_init(&hob_iterator) != CB_SUCCESS) { printk(BIOS_ERR, "%s incomplete because no HOB list was found\n", diff --git a/src/soc/amd/mendocino/root_complex.c b/src/soc/amd/mendocino/root_complex.c index 7a58f01..a8c4d68 100644 --- a/src/soc/amd/mendocino/root_complex.c +++ b/src/soc/amd/mendocino/root_complex.c @@ -149,7 +149,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(); @@ -189,10 +188,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);
if (fsp_hob_iterator_init(&hob_iterator) != CB_SUCCESS) { printk(BIOS_ERR, "%s incomplete because no HOB list was found\n", diff --git a/src/soc/amd/phoenix/root_complex.c b/src/soc/amd/phoenix/root_complex.c index 3110ea3..647ef11 100644 --- a/src/soc/amd/phoenix/root_complex.c +++ b/src/soc/amd/phoenix/root_complex.c @@ -121,7 +121,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(); @@ -161,10 +160,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);
if (fsp_hob_iterator_init(&hob_iterator) != CB_SUCCESS) { printk(BIOS_ERR, "%s incomplete because no HOB list was found\n", diff --git a/src/soc/amd/picasso/root_complex.c b/src/soc/amd/picasso/root_complex.c index cd10fdb..283b157 100644 --- a/src/soc/amd/picasso/root_complex.c +++ b/src/soc/amd/picasso/root_complex.c @@ -106,7 +106,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(); @@ -144,10 +143,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);
if (fsp_hob_iterator_init(&hob_iterator) != CB_SUCCESS) { printk(BIOS_ERR, "%s incomplete because no HOB list was found\n", __func__);