[coreboot] [v2] r4606 - trunk/coreboot-v2/src/devices

svn at coreboot.org svn at coreboot.org
Fri Aug 28 14:48:02 CEST 2009


Author: oxygene
Date: 2009-08-28 14:48:02 +0200 (Fri, 28 Aug 2009)
New Revision: 4606

Modified:
   trunk/coreboot-v2/src/devices/device.c
Log:
The resource allocator complained about 0-sized fixed
resources before actually validating if the resource is
a fixed one.

No harm done, except some confusion of the user (in this case: me).

Signed-off-by: Patrick Georgi <patrick.georgi at coresystems.de>
Acked-by: Stefan Reinauer <stepan at coresystems.de>
Acked-by: Uwe Hermann <uwe at hermann-uwe.de>


Modified: trunk/coreboot-v2/src/devices/device.c
===================================================================
--- trunk/coreboot-v2/src/devices/device.c	2009-08-28 10:17:03 UTC (rev 4605)
+++ trunk/coreboot-v2/src/devices/device.c	2009-08-28 12:48:02 UTC (rev 4606)
@@ -556,14 +556,14 @@
 	/* Constrain limits based on the fixed resources of this device. */
 	for (i = 0; i < dev->resources; i++) {
 		res = &dev->resource[i];
+		if (!(res->flags & IORESOURCE_FIXED))
+			continue;
 		if (!res->size) {
 			/* It makes no sense to have 0-sized, fixed resources.*/
 			printk_err("skipping %s@%lx fixed resource, size=0!\n",
 				   dev_path(dev), res->index);
 			continue;
 		}
-		if (!(res->flags & IORESOURCE_FIXED))
-			continue;
 
 		/* PREFETCH, MEM, or I/O - skip any others. */
 		if ((res->flags & MEM_MASK) == PREF_TYPE)





More information about the coreboot mailing list