From 1bb3675c1920d18d2ebee76cc46aa57d217b11a1 Mon Sep 17 00:00:00 2001 From: Patrick Georgi Date: Tue, 5 May 2009 14:06:20 +0000 Subject: 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 Acked-by: Ward Vandewege git-svn-id: svn://svn.coreboot.org/coreboot/trunk@4254 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1 --- src/arch/i386/lib/copy_and_run.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/arch/i386/lib/copy_and_run.c') diff --git a/src/arch/i386/lib/copy_and_run.c b/src/arch/i386/lib/copy_and_run.c index bf8d592f54..9cec90a81c 100644 --- a/src/arch/i386/lib/copy_and_run.c +++ b/src/arch/i386/lib/copy_and_run.c @@ -44,11 +44,10 @@ void copy_and_run_core(u8 *src, u8 *dst, unsigned long ilen, unsigned ebp) 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) ); } -- cgit v1.2.3