[coreboot] patch: add zero fill command option to lar

Carl-Daniel Hailfinger c-d.hailfinger.devel.2006 at gmx.net
Sat Feb 9 22:06:50 CET 2008

On 09.02.2008 18:56, ron minnich wrote:
> You can now say:
> lar z build/bios.bin
> and get a zero-filled lar entry.

If I read the code correctly, the command will try to fill the first
occurrence of free space in the lar, not the biggest one. That means we
might have to call it multiple times.
And a general problem with the code: If it finds the offset of the first
empty area, it checks whether the area is big enough. If not, it does
not search for another empty area, but returns instead with an error.
This will cause zerofilling for some archives to fail.
I give you an ack below, bu I'd like to see the points above addressed
in some later patch (or now, if you feel like it).

>  The "zeros" are actually 0xff,

Should we really call this "zerofill"?

> which is flash-friendly and makes flashrom fast.

Well, flashing 0xff is not generally faster for SPI due to various
chip/chipset/protocol limitations. It is possible to speed this up for a
few special cases (one of them would be naturally-aligned 256-byte
blocks of 0xff).
Thanks for giving me this idea!

> Parts of stream.c could use the new functions, in particular hlen, but
> that patch is for later.
> This change dramatically speeds up booting on the alix 1c.
> ron
> Add a zero-fill command to lar. 
> Signed-off-by: Ronald G. Minnich <rminnich at gmail.com>

Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006 at gmx.net>


More information about the coreboot mailing list