[coreboot] [v2] r4776 - trunk/coreboot-v2/src/arch/i386/lib

Stefan Reinauer stepan at coresystems.de
Thu Oct 15 14:32:06 CEST 2009


svn at coreboot.org wrote:
> Author: hailfinger
> Date: 2009-10-15 01:51:05 +0200 (Thu, 15 Oct 2009)
> New Revision: 4776
>
> Modified:
>    trunk/coreboot-v2/src/arch/i386/lib/cbfs_and_run.c
> Log:
> cbfs_and_run_core() did not check the return code of cbfs_load_stage()
> and jumped to (void*)-1 on error.
> Die properly instead.
> I didn't use die() because that caused a linker error.
>
> Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006 at gmx.net>
> Acked-by: Myles Watson <mylesgw at gmail.com>
>
>
> Modified: trunk/coreboot-v2/src/arch/i386/lib/cbfs_and_run.c
> ===================================================================
> --- trunk/coreboot-v2/src/arch/i386/lib/cbfs_and_run.c	2009-10-14 20:49:49 UTC (rev 4775)
> +++ trunk/coreboot-v2/src/arch/i386/lib/cbfs_and_run.c	2009-10-14 23:51:05 UTC (rev 4776)
> @@ -11,6 +11,11 @@
>  	u8 *dst;
>  	print_debug("Jumping to image.\r\n");
>  	dst = cbfs_load_stage(filename);
> +	if (dst == (void *) -1) {
> +		/* We should use die() here. */
> +		print_emerg("Loading stage failed!\n");
> +		for (;;);
> +	}
>   
Can we do for (;;) asm("hlt"); instead?




-- 
coresystems GmbH • Brahmsstr. 16 • D-79104 Freiburg i. Br.
      Tel.: +49 761 7668825 • Fax: +49 761 7664613
Email: info at coresystems.dehttp://www.coresystems.de/
Registergericht: Amtsgericht Freiburg • HRB 7656
Geschäftsführer: Stefan Reinauer • Ust-IdNr.: DE245674866





More information about the coreboot mailing list