Author: mcayland Date: Mon Dec 16 19:06:13 2013 New Revision: 1240 URL: http://tracker.coreboot.org/trac/openbios/changeset/1240
Log: SPARC64: fix stack underflow when no boot device argument is supplied
Signed-off-by: Mark Cave-Ayland mark.cave-ayland@ilande.co.uk
Modified: trunk/openbios-devel/arch/sparc64/boot.c
Modified: trunk/openbios-devel/arch/sparc64/boot.c ============================================================================== --- trunk/openbios-devel/arch/sparc64/boot.c Tue Dec 10 22:01:48 2013 (r1239) +++ trunk/openbios-devel/arch/sparc64/boot.c Mon Dec 16 19:06:13 2013 (r1240) @@ -71,6 +71,7 @@ printk("Image returned with return value %#x\n", image_retval); }
+/* ( path len -- path len ) */
void boot(void) { @@ -99,6 +100,8 @@ POP(); fword("get-package-property"); POP(); + /* Update our local copy of path as well as the one on the stack */ + fword("2dup"); path = pop_fstr_copy(); }