diff options
Diffstat (limited to 'src/northbridge/intel/haswell/northbridge.c')
-rw-r--r-- | src/northbridge/intel/haswell/northbridge.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/northbridge/intel/haswell/northbridge.c b/src/northbridge/intel/haswell/northbridge.c index 606461b4e7..a1bd143dd2 100644 --- a/src/northbridge/intel/haswell/northbridge.c +++ b/src/northbridge/intel/haswell/northbridge.c @@ -106,11 +106,11 @@ static void mc_add_fixed_mmio_resources(struct device *dev) continue; resource = new_resource(dev, mc_fixed_resources[i].index); + resource->base = base; + resource->size = size; resource->flags = IORESOURCE_MEM | IORESOURCE_FIXED | IORESOURCE_STORED | IORESOURCE_RESERVE | IORESOURCE_ASSIGNED; - resource->base = base; - resource->size = size; printk(BIOS_DEBUG, "%s: Adding %s @ %x 0x%08lx-0x%08lx.\n", __func__, mc_fixed_resources[i].description, index, (unsigned long)base, (unsigned long)(base + size - 1)); @@ -298,7 +298,7 @@ static void mc_add_dram_resources(struct device *dev, int *resource_cnt) /* TSEG - DPR -> BGSM */ resource = new_resource(dev, index++); resource->base = mc_values[TSEG_REG] - dpr.size * MiB; - resource->size = mc_values[BGSM_REG] - resource->base; + resource->size = mc_values[BGSM_REG] - (mc_values[TSEG_REG] - dpr.size * MiB); resource->flags = IORESOURCE_MEM | IORESOURCE_FIXED | IORESOURCE_STORED | IORESOURCE_RESERVE | IORESOURCE_ASSIGNED | IORESOURCE_CACHEABLE; @@ -306,7 +306,7 @@ static void mc_add_dram_resources(struct device *dev, int *resource_cnt) if (mc_values[BGSM_REG] != mc_values[TOLUD_REG]) { resource = new_resource(dev, index++); resource->base = mc_values[BGSM_REG]; - resource->size = mc_values[TOLUD_REG] - resource->base; + resource->size = mc_values[TOLUD_REG] - mc_values[BGSM_REG]; resource->flags = IORESOURCE_MEM | IORESOURCE_FIXED | IORESOURCE_STORED | IORESOURCE_RESERVE | IORESOURCE_ASSIGNED; } |