[coreboot] nrv2b cleanup patch

Myles Watson mylesgw at gmail.com
Thu Mar 13 23:54:42 CET 2008


On Thu, Mar 13, 2008 at 2:14 PM, Myles Watson <mylesgw at gmail.com> wrote:
> This patch changes do_nrv2b_compress to act like do_lzma_compress.  In other
>  words, it now allocates and frees its own memory.  This saves lar from having
>  to know about worst case compression to avoid memory corruption.
>
>  Tested by building coreboot with nrv2b as default, then copying to an lzma lar,
>  then copying back to an nrv2b lar.  No differences.
>
This patch adds comments to lar_compress, do_lzma_compress, and
do_nrv2b_compress.  It also checks to make sure that the compressed
size is smaller than the input size before copying the data back.

Myles

Signed-off-by: Myles Watson <mylesgw at gmail.com>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: compression.diff
Type: text/x-patch
Size: 2455 bytes
Desc: not available
URL: <http://www.coreboot.org/pipermail/coreboot/attachments/20080313/0372f624/attachment.diff>


More information about the coreboot mailing list