[coreboot] Zero compression in v3 patch

Myles Watson mylesgw at gmail.com
Fri Feb 15 20:09:13 CET 2008

Sorry, my mail server went down, so I'm trying to catch up.

>On Thu, Feb 14, 2008 at 10:13:16AM -0700, Myles Watson wrote:
>> I left the one byte so that the checksum wouldn't be broken.

>This is important. Please add a comment in do_zeroes_compress().

I'll do that.

> > +++ include/lar.h	(working copy)
> > @@ -67,6 +67,7 @@
> >  	 * 0 = no compression
> >  	 * 1 = lzma
> >  	 * 2 = nrv2b
> > +	 * 3 = zeroes

> I would really like a more generic RLE version that copes with any
> repeated byte value. It will be dirt simple, not much code and no
> dependecies, thus always included.

> Possibly lar should even try to autodetect suitable candidates for
> RLE compression. But note that the flashfiller file is a special
> case that must never be RLE compressed.

I thought about this, but since I couldn't think of a use case, I didn't
know how big to make the repeating value (u8, u32), where to autodetect it,
etc.  Maybe for debugging someone will want to fill an area with 0xAA5555AA?

You're right that it would be easy to add, but I think without a use case
it'll be hard to get the right features in.


More information about the coreboot mailing list