Attention is currently required from: Arthur Heymans.
Hello Arthur Heymans,
I'd like you to do a code review. Please visit
https://review.coreboot.org/c/coreboot/+/76090?usp=email
to review the following change.
Change subject: allocator_v4: Fix top-level allocations w/o IORESOURCE_ABOVE_4G ......................................................................
allocator_v4: Fix top-level allocations w/o IORESOURCE_ABOVE_4G
When moving the code to allocate at the top level in commit 9260ea60bfa4 (allocator_v4: Use memranges only for toplevel), a call to restrict the limit of the resource was dropped. Probably by accident in one of the earliest rebases. Without this call to effective_limit(), 64-bit resour- ces at the top level, i.e. PCI bus 0, were always placed above 4G. Even when this was not requestion with the IORESOURCE_ABOVE_4G flag.
Change-Id: Ied3a0695ef5e91f092bf2d442c1c482057643483 Signed-off-by: Nico Huber nico.h@gmx.de --- M src/device/resource_allocator_v4.c 1 file changed, 2 insertions(+), 2 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/90/76090/1
diff --git a/src/device/resource_allocator_v4.c b/src/device/resource_allocator_v4.c index e64d8ad..96d4488 100644 --- a/src/device/resource_allocator_v4.c +++ b/src/device/resource_allocator_v4.c @@ -401,8 +401,8 @@ if (!res->size) continue;
- if (!memranges_steal(&ranges, res->limit, res->size, res->align, type, &base, - CONFIG(RESOURCE_ALLOCATION_TOP_DOWN))) { + if (!memranges_steal(&ranges, effective_limit(res), res->size, res->align, + type, &base, CONFIG(RESOURCE_ALLOCATION_TOP_DOWN))) { printk(BIOS_ERR, "Resource didn't fit!!!\n"); print_failed_res(dev, res); continue;