[coreboot] [PATCH]The resource allocator does not like zero-sized fixed resources
Patrick Georgi
patrick at georgi-clan.de
Wed Aug 19 18:51:15 CEST 2009
Am 19.08.2009 18:18, schrieb Myles Watson:
> The problem is that they have bogus limits, not that they have no
> size.
A zero-sized resource with proper limits still fails. See:
/* Is it already outside the limits? */
if (res->size && (((res->base + res->size -1) < lim->base) || (res->base
> lim->limit)))
continue;
A resource with size == 0 is never "outside the limits". The code after
these lines assumes that any resource that passes this test is inside
the limits.
> Even if you commit this fix, you should fix the incorrect
> limits. They are two different problems.
>
A fixed resource is supposed to have base+size=limit, with base and size
of the right alignment and granularity, right?
How about we warn about that explicitely? I can prepare a patch, the
location where I put the current patch would be a good place for that
warning, right?
Patrick
More information about the coreboot
mailing list