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@gmail.com> Acked-by: Stefan Reinauer <stepan@coresystems.de> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@4023 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
This commit is contained in:
parent
5dd4a20b96
commit
2a63ea580a
|
@ -175,12 +175,12 @@ void jmp_to_elf_entry(void *entry, unsigned long buffer)
|
||||||
" popl %%esi\n\t"
|
" popl %%esi\n\t"
|
||||||
|
|
||||||
::
|
::
|
||||||
"g" (lb_start), "g" (buffer), "g" (lb_size),
|
"ri" (lb_start), "ri" (buffer), "ri" (lb_size),
|
||||||
"g" (entry),
|
"ri" (entry),
|
||||||
#if CONFIG_MULTIBOOT
|
#if CONFIG_MULTIBOOT
|
||||||
"g"(mbi), "g" (MB_MAGIC2)
|
"ri"(mbi), "ri" (MB_MAGIC2)
|
||||||
#else
|
#else
|
||||||
"g"(adjusted_boot_notes), "g" (0x0E1FB007)
|
"ri"(adjusted_boot_notes), "ri" (0x0E1FB007)
|
||||||
#endif
|
#endif
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue