[coreboot] [v2] r4023 - trunk/coreboot-v2/src/arch/i386/boot
svn at coreboot.org
svn at coreboot.org
Fri Mar 20 19:29:49 CET 2009
Author: myles
Date: 2009-03-20 19:29:49 +0100 (Fri, 20 Mar 2009)
New Revision: 4023
Modified:
trunk/coreboot-v2/src/arch/i386/boot/boot.c
Log:
Kevin O'Connor said:
The bug is in src/arch/i386/boot/boot.c. The inline assembly in
jmp_to_elf_entry uses the "g" flag to pass in parameters. However,
"g" allows gcc to use stack relative addressing of parameters.
Easiest fix would be to change "g" to "ri" - put the parameter either
in a register or as an immediate value.
That's what this patch does.
Signed-off-by: Myles Watson <mylesgw at gmail.com>
Acked-by: Stefan Reinauer <stepan at coresystems.de>
Modified: trunk/coreboot-v2/src/arch/i386/boot/boot.c
===================================================================
--- trunk/coreboot-v2/src/arch/i386/boot/boot.c 2009-03-20 16:36:05 UTC (rev 4022)
+++ trunk/coreboot-v2/src/arch/i386/boot/boot.c 2009-03-20 18:29:49 UTC (rev 4023)
@@ -175,12 +175,12 @@
" popl %%esi\n\t"
::
- "g" (lb_start), "g" (buffer), "g" (lb_size),
- "g" (entry),
+ "ri" (lb_start), "ri" (buffer), "ri" (lb_size),
+ "ri" (entry),
#if CONFIG_MULTIBOOT
- "g"(mbi), "g" (MB_MAGIC2)
+ "ri"(mbi), "ri" (MB_MAGIC2)
#else
- "g"(adjusted_boot_notes), "g" (0x0E1FB007)
+ "ri"(adjusted_boot_notes), "ri" (0x0E1FB007)
#endif
);
}
More information about the coreboot
mailing list