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>
This commit is contained in:
Furquan Shaikh 2020-05-20 10:18:35 -07:00 committed by Patrick Georgi
parent 69395742b8
commit 468bc6cd8f
1 changed files with 1 additions and 5 deletions

View File

@ -241,12 +241,8 @@ static void __allocate_resources(struct bus *bus, struct resource *bridge,
resource->limit = bridge->limit; resource->limit = bridge->limit;
/* Size 0 resources can be skipped. */ /* Size 0 resources can be skipped. */
if (!resource->size) { if (!resource->size)
/* Set the base to limit so it doesn't confuse tolm. */
resource->base = resource->limit;
resource->flags |= IORESOURCE_ASSIGNED;
continue; continue;
}
if (resource->flags & IORESOURCE_IO) { if (resource->flags & IORESOURCE_IO) {
/* /*