[coreboot] [PATCH] CBFS decompress error

Myles Watson mylesgw at gmail.com
Thu Oct 8 22:49:15 CEST 2009

Move the ulzma prototype into cbfs.h
Check the return value when decompressing.

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,
		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?


More information about the coreboot mailing list