summaryrefslogtreecommitdiff
path: root/src/northbridge/intel/i945
diff options
context:
space:
mode:
authorKyösti Mälkki <kyosti.malkki@gmail.com>2021-06-26 19:09:05 +0300
committerFelix Held <felix-coreboot@felixheld.de>2022-05-24 14:52:12 +0000
commitc1d4d0b0ea6ebe21d42e471e17d8eaf85817d005 (patch)
treec3db02af775b6bd78b50dddfa094349dc5cf7da2 /src/northbridge/intel/i945
parent0a3bbe8645bbd88285f3128d9c2f49af4fb5535b (diff)
nb/intel/i945,gm45: Use incrementing index with fixed resource
Do this for consistency, while followup will remove the index completely. Change-Id: I7b4822c3909801e91627ed2ffe776d65dfab08d5 Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/55927 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Arthur Heymans <arthur@aheymans.xyz> Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Diffstat (limited to 'src/northbridge/intel/i945')
-rw-r--r--src/northbridge/intel/i945/northbridge.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/northbridge/intel/i945/northbridge.c b/src/northbridge/intel/i945/northbridge.c
index 4909143a1f..a111378fd8 100644
--- a/src/northbridge/intel/i945/northbridge.c
+++ b/src/northbridge/intel/i945/northbridge.c
@@ -21,6 +21,7 @@ static void mch_domain_read_resources(struct device *dev)
uint64_t uma_memory_base = 0, uma_memory_size = 0;
uint64_t tseg_memory_base = 0, tseg_memory_size = 0;
struct device *const d0f0 = pcidev_on_root(0, 0);
+ int idx = 3;
pci_domain_read_resources(dev);
@@ -74,15 +75,15 @@ static void mch_domain_read_resources(struct device *dev)
printk(BIOS_INFO, " (%dM)\n", (uint32_t)(tomk_stolen / KiB));
/* Report the memory regions */
- ram_resource(dev, 3, 0, 0xa0000 / KiB);
- ram_resource(dev, 4, 1 * MiB / KiB, (tomk - 1 * MiB / KiB));
- uma_resource(dev, 5, uma_memory_base / KiB, uma_memory_size / KiB);
- mmio_resource(dev, 6, tseg_memory_base / KiB, tseg_memory_size / KiB);
- uma_resource(dev, 7, cbmem_topk, delta_cbmem);
+ ram_resource(dev, idx++, 0, 0xa0000 / KiB);
+ ram_resource(dev, idx++, 1 * MiB / KiB, (tomk - 1 * MiB / KiB));
+ uma_resource(dev, idx++, uma_memory_base / KiB, uma_memory_size / KiB);
+ mmio_resource(dev, idx++, tseg_memory_base / KiB, tseg_memory_size / KiB);
+ uma_resource(dev, idx++, cbmem_topk, delta_cbmem);
/* legacy VGA memory */
- mmio_resource(dev, 8, 0xa0000 / KiB, (0xc0000 - 0xa0000) / KiB);
+ mmio_resource(dev, idx++, 0xa0000 / KiB, (0xc0000 - 0xa0000) / KiB);
/* RAM to be used for option roms and BIOS */
- reserved_ram_resource(dev, 9, 0xc0000 / KiB, (1 * MiB - 0xc0000) / KiB);
+ reserved_ram_resource(dev, idx++, 0xc0000 / KiB, (1 * MiB - 0xc0000) / KiB);
}
static void mch_domain_set_resources(struct device *dev)