Hi,
attached patch fixes a small issue with the resource allocator. In a
loop in which only fixed resources are processed, zero-sized resources
were able to modify the limits used for resource allocation in a later
phase. This leads to overlapping resources on kontron.
I had a patch for that a while ago already, but this one is much cleaner
and much more obvious in its intent.
If you think there shouldn't be zero-sized fixed resources, please take
a look at src/devices/pci_device.c, line 331. There, a fixed resource
with no size is created, and there is no obvious value to set for size.
Even if there shouldn't be such resources, I think it's still good to
prevent them from causing trouble if they appear.
Signed-off-by: Patrick Georgi <[email protected]>
Index: src/devices/device.c
===================================================================
--- src/devices/device.c (Revision 4554)
+++ src/devices/device.c (Arbeitskopie)
@@ -556,6 +556,8 @@
/* Constrain limits based on the fixed resources of this device. */
for (i = 0; i < dev->resources; i++) {
res = &dev->resource[i];
+ if (!res->size)
+ continue;
if (!(res->flags & IORESOURCE_FIXED))
continue;
--
coreboot mailing list: [email protected]
http://www.coreboot.org/mailman/listinfo/coreboot