Felix Held has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/69460 )
Change subject: soc/amd/root_complex: report IOAPIC resource in !hob case ......................................................................
soc/amd/root_complex: report IOAPIC resource in !hob case
When no HOB list is found, not only adding the resources reported by the FSP were skipped, but also adding the GNB IOAPIC resource was skipped. Fix this bug by moving the reporting of the GNB IOAPIC resource before the resources reported in the FSP HOBs to not skip the IOAPIC resource when there's no HOB list.
Signed-off-by: Felix Held felix-coreboot@felixheld.de Change-Id: I9174c8d7e5e94144187d27210e12f2dca3a6010f --- 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/morgana/root_complex.c M src/soc/amd/picasso/root_complex.c 5 files changed, 46 insertions(+), 30 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/60/69460/1
diff --git a/src/soc/amd/cezanne/root_complex.c b/src/soc/amd/cezanne/root_complex.c index ed919b1..5f2024c 100644 --- a/src/soc/amd/cezanne/root_complex.c +++ b/src/soc/amd/cezanne/root_complex.c @@ -142,6 +142,12 @@
mmconf_resource(dev, idx++);
+ /* GNB IOAPIC resource */ + gnb_apic = new_resource(dev, idx++); + gnb_apic->base = GNB_IO_APIC_ADDR; + gnb_apic->size = 0x00001000; + gnb_apic->flags = IORESOURCE_MEM | IORESOURCE_ASSIGNED | IORESOURCE_FIXED; + if (!hob) { printk(BIOS_ERR, "%s incomplete because no HOB list was found\n", __func__); @@ -168,12 +174,6 @@ printk(BIOS_ERR, "failed to set resources for type %d\n", res->type); } - - /* GNB IOAPIC resource */ - gnb_apic = new_resource(dev, idx++); - gnb_apic->base = GNB_IO_APIC_ADDR; - gnb_apic->size = 0x00001000; - gnb_apic->flags = IORESOURCE_MEM | IORESOURCE_ASSIGNED | IORESOURCE_FIXED; }
static void root_complex_init(struct device *dev) diff --git a/src/soc/amd/glinda/root_complex.c b/src/soc/amd/glinda/root_complex.c index ef6c630..39b680d 100644 --- a/src/soc/amd/glinda/root_complex.c +++ b/src/soc/amd/glinda/root_complex.c @@ -157,6 +157,12 @@
mmconf_resource(dev, idx++);
+ /* GNB IOAPIC resource */ + gnb_apic = new_resource(dev, idx++); + gnb_apic->base = GNB_IO_APIC_ADDR; + gnb_apic->size = 0x00001000; + gnb_apic->flags = IORESOURCE_MEM | IORESOURCE_ASSIGNED | IORESOURCE_FIXED; + if (!hob) { printk(BIOS_ERR, "Error: %s incomplete because no HOB list was found\n", __func__); @@ -183,12 +189,6 @@ printk(BIOS_ERR, "Error: failed to set resources for type %d\n", res->type); } - - /* GNB IOAPIC resource */ - gnb_apic = new_resource(dev, idx++); - gnb_apic->base = GNB_IO_APIC_ADDR; - gnb_apic->size = 0x00001000; - gnb_apic->flags = IORESOURCE_MEM | IORESOURCE_ASSIGNED | IORESOURCE_FIXED; }
static void root_complex_init(struct device *dev) diff --git a/src/soc/amd/mendocino/root_complex.c b/src/soc/amd/mendocino/root_complex.c index 6768613..7bd669e 100644 --- a/src/soc/amd/mendocino/root_complex.c +++ b/src/soc/amd/mendocino/root_complex.c @@ -157,6 +157,12 @@
mmconf_resource(dev, idx++);
+ /* GNB IOAPIC resource */ + gnb_apic = new_resource(dev, idx++); + gnb_apic->base = GNB_IO_APIC_ADDR; + gnb_apic->size = 0x00001000; + gnb_apic->flags = IORESOURCE_MEM | IORESOURCE_ASSIGNED | IORESOURCE_FIXED; + if (!hob) { printk(BIOS_ERR, "Error: %s incomplete because no HOB list was found\n", __func__); @@ -183,12 +189,6 @@ printk(BIOS_ERR, "Error: failed to set resources for type %d\n", res->type); } - - /* GNB IOAPIC resource */ - gnb_apic = new_resource(dev, idx++); - gnb_apic->base = GNB_IO_APIC_ADDR; - gnb_apic->size = 0x00001000; - gnb_apic->flags = IORESOURCE_MEM | IORESOURCE_ASSIGNED | IORESOURCE_FIXED; }
static void root_complex_init(struct device *dev) diff --git a/src/soc/amd/morgana/root_complex.c b/src/soc/amd/morgana/root_complex.c index 88bcca7..b1bd1ed 100644 --- a/src/soc/amd/morgana/root_complex.c +++ b/src/soc/amd/morgana/root_complex.c @@ -157,6 +157,12 @@
mmconf_resource(dev, idx++);
+ /* GNB IOAPIC resource */ + gnb_apic = new_resource(dev, idx++); + gnb_apic->base = GNB_IO_APIC_ADDR; + gnb_apic->size = 0x00001000; + gnb_apic->flags = IORESOURCE_MEM | IORESOURCE_ASSIGNED | IORESOURCE_FIXED; + if (!hob) { printk(BIOS_ERR, "Error: %s incomplete because no HOB list was found\n", __func__); @@ -183,12 +189,6 @@ printk(BIOS_ERR, "Error: failed to set resources for type %d\n", res->type); } - - /* GNB IOAPIC resource */ - gnb_apic = new_resource(dev, idx++); - gnb_apic->base = GNB_IO_APIC_ADDR; - gnb_apic->size = 0x00001000; - gnb_apic->flags = IORESOURCE_MEM | IORESOURCE_ASSIGNED | IORESOURCE_FIXED; }
static void root_complex_init(struct device *dev) diff --git a/src/soc/amd/picasso/root_complex.c b/src/soc/amd/picasso/root_complex.c index d53643e..4892023 100644 --- a/src/soc/amd/picasso/root_complex.c +++ b/src/soc/amd/picasso/root_complex.c @@ -140,6 +140,12 @@
mmconf_resource(dev, idx++);
+ /* GNB IOAPIC resource */ + gnb_apic = new_resource(dev, idx++); + gnb_apic->base = GNB_IO_APIC_ADDR; + gnb_apic->size = 0x00001000; + gnb_apic->flags = IORESOURCE_MEM | IORESOURCE_ASSIGNED | IORESOURCE_FIXED; + if (!hob) { printk(BIOS_ERR, "%s incomplete because no HOB list was found\n", __func__); @@ -166,12 +172,6 @@ printk(BIOS_ERR, "failed to set resources for type %d\n", res->type); } - - /* GNB IOAPIC resource */ - gnb_apic = new_resource(dev, idx++); - gnb_apic->base = GNB_IO_APIC_ADDR; - gnb_apic->size = 0x00001000; - gnb_apic->flags = IORESOURCE_MEM | IORESOURCE_ASSIGNED | IORESOURCE_FIXED; }
static void root_complex_init(struct device *dev)