From 56b037b857e17691dfb528f969772a8acb28b2c4 Mon Sep 17 00:00:00 2001 From: Felix Held Date: Wed, 2 Mar 2022 22:57:01 +0100 Subject: soc/amd/*/northbridge,root_complex: simplify mmconf_resource index In the northbridge's and root complex' read_resources function, the mmconf resource used the number of the MMIO_CONF_BASE MSR as index which might be misleading. Instead use idx++ as a unique index for this resource. TEST=Resource allocator doesn't complain and no related warnings or errors in dmesg. The update_constraints console output changes like expected: Before: PCI: 00:00.0 c0010058 base f8000000 limit fbffffff mem (fixed) After: PCI: 00:00.0 06 base f8000000 limit fbffffff mem (fixed) Signed-off-by: Felix Held Change-Id: Id66c6153fad86bed36db7bd2455075f4a0850750 Reviewed-on: https://review.coreboot.org/c/coreboot/+/62545 Tested-by: build bot (Jenkins) Reviewed-by: Raul Rangel --- src/soc/amd/picasso/root_complex.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/soc/amd/picasso') diff --git a/src/soc/amd/picasso/root_complex.c b/src/soc/amd/picasso/root_complex.c index 4ea8bc22c71b..076588e4f91d 100644 --- a/src/soc/amd/picasso/root_complex.c +++ b/src/soc/amd/picasso/root_complex.c @@ -136,7 +136,7 @@ static void read_resources(struct device *dev) ram_resource(dev, idx++, early_reserved_dram_end / KiB, (mem_usable - early_reserved_dram_end) / KiB); - mmconf_resource(dev, MMIO_CONF_BASE); + mmconf_resource(dev, idx++); if (!hob) { printk(BIOS_ERR, "%s incomplete because no HOB list was found\n", -- cgit v1.2.3