summaryrefslogtreecommitdiff
path: root/src/device
diff options
context:
space:
mode:
authorFurquan Shaikh <furquan@google.com>2020-05-20 10:18:35 -0700
committerPatrick Georgi <pgeorgi@google.com>2020-05-26 15:15:54 +0000
commit468bc6cd8f765016aa4e01e20e8f020ac820cbb7 (patch)
treef82af2a39b8a786eb0da2c5af14cd2e241bd9a63 /src/device
parent69395742b8e45433e42c54e6cf8e67a692f923e9 (diff)
device/resource_allocator_v3: Do not set IORESOURCE_ASSIGNED for size 0 resource
find_pci_tolm() is updated to ensure that it ignores resources that have a zero size. This change removes the setting of resource flags to IORESOURCE_ASSIGNED when the resource is not really allocated any space by the allocator. It also drops the setting of base to limit since that is not required anymore. Change-Id: If8c0d4bf1aa9cd6a5bdf056140f65cf2d70ed216 Signed-off-by: Furquan Shaikh <furquan@google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/41566 Reviewed-by: Nico Huber <nico.h@gmx.de> Reviewed-by: Aaron Durbin <adurbin@chromium.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/device')
-rw-r--r--src/device/resource_allocator_v3.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/device/resource_allocator_v3.c b/src/device/resource_allocator_v3.c
index 4eeb2409f8..236e149cef 100644
--- a/src/device/resource_allocator_v3.c
+++ b/src/device/resource_allocator_v3.c
@@ -241,12 +241,8 @@ static void __allocate_resources(struct bus *bus, struct resource *bridge,
resource->limit = bridge->limit;
/* Size 0 resources can be skipped. */
- if (!resource->size) {
- /* Set the base to limit so it doesn't confuse tolm. */
- resource->base = resource->limit;
- resource->flags |= IORESOURCE_ASSIGNED;
+ if (!resource->size)
continue;
- }
if (resource->flags & IORESOURCE_IO) {
/*