summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKyösti Mälkki <kyosti.malkki@gmail.com>2015-03-23 19:58:23 +0200
committerKyösti Mälkki <kyosti.malkki@gmail.com>2015-05-05 01:25:04 +0200
commit134b6162673733bb457adf3350148646c3821be1 (patch)
tree9acfd4080cd7b65aef8a96e6e33efe444228c8f1
parentade2c5e8b78f2a9948f5ca93bc795dc8bac41afa (diff)
downloadcoreboot-134b6162673733bb457adf3350148646c3821be1.tar.xz
resource: Report correct secondary resource window
Once a bridge window resource is allocated, it becomes the base and limit for any resource on the secondary bus. Upper limit was incorrectly reported in the log while assigning secondary resources. Change-Id: I69f0a02aae6d13f77aaa2dace924b8970b23edad Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-on: http://review.coreboot.org/8888 Tested-by: build bot (Jenkins) Reviewed-by: Aaron Durbin <adurbin@chromium.org>
-rw-r--r--src/device/device.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/device/device.c b/src/device/device.c
index b3b8d241a7..117bd1802b 100644
--- a/src/device/device.c
+++ b/src/device/device.c
@@ -525,6 +525,7 @@ static void allocate_resources(struct bus *bus, struct resource *bridge,
/* Base must be aligned. */
base = round(base, resource->align);
resource->base = base;
+ resource->limit = resource->base + resource->size - 1;
resource->flags |= IORESOURCE_ASSIGNED;
resource->flags &= ~IORESOURCE_STORED;
base += resource->size;