Fix a bug introduced in the copy_and_run refactoring.
The new code always decompressed to dst (as it should)
and then jumped to _iseg, when it should jump to dst.
With dst != _iseg this breaks (coreboot_apc)
Signed-off-by: Patrick Georgi <patrick.georgi@coresystems.de>
Acked-by: Ward Vandewege <ward@gnu.org>
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@4254 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
diff --git a/src/arch/i386/lib/copy_and_run.c b/src/arch/i386/lib/copy_and_run.c
index bf8d592..9cec90a 100644
--- a/src/arch/i386/lib/copy_and_run.c
+++ b/src/arch/i386/lib/copy_and_run.c
@@ -44,11 +44,10 @@
print_debug("Jumping to image.\r\n");
__asm__ volatile (
- "movl %0, %%ebp\n\t"
+ "movl %%eax, %%ebp\n\t"
"cli\n\t"
- "leal _iseg, %%edi\n\t"
"jmp *%%edi\n\t"
- :: "a"(ebp)
+ :: "a"(ebp), "D"(dst)
);
}