[coreboot] [PATCH] CBFS decompress error

Myles Watson mylesgw at gmail.com
Thu Oct 8 22:50:08 CEST 2009


On Thu, Oct 8, 2009 at 2:49 PM, Myles Watson <mylesgw at gmail.com> wrote:
> Move the ulzma prototype into cbfs.h
> Check the return value when decompressing.

With the patch.
Signed-off-by: Myles Watson <mylesgw at gmail.com>

> It's not 100% fixed, since the caller (cbfs_load_stage)
>
>        if (cbfs_decompress(stage->compression,
>                             ((unsigned char *) stage) +
>                             sizeof(struct cbfs_stage),
>                             (void *) (u32) stage->load,
>                             stage->len))
>                return (void *) -1;
>
> returns -1 and then cbfs_and_run_core jumps to it.
>
> print_debug("Jumping to image.\r\n");
> dst = cbfs_load_stage(filename);
> print_debug("Jumping to image.\r\n");
>
> Why do we jump to a -1 instead of hanging?
>
> Thanks,
> Myles
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cbfs_error.diff
Type: text/x-patch
Size: 1496 bytes
Desc: not available
URL: <http://www.coreboot.org/pipermail/coreboot/attachments/20091008/4f2fe8fc/attachment.diff>


More information about the coreboot mailing list