summaryrefslogtreecommitdiff
path: root/src/arch/i386
diff options
context:
space:
mode:
authorPatrick Georgi <patrick.georgi@coresystems.de>2009-05-05 14:06:20 +0000
committerPatrick Georgi <patrick.georgi@coresystems.de>2009-05-05 14:06:20 +0000
commit1bb3675c1920d18d2ebee76cc46aa57d217b11a1 (patch)
treeb4ef45dc0eae0f2a3583b1f99f428c5828be6b13 /src/arch/i386
parentf95b49eeb8f2fd817869c363295d1467d86be9be (diff)
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
Diffstat (limited to 'src/arch/i386')
-rw-r--r--src/arch/i386/lib/copy_and_run.c5
1 files changed, 2 insertions, 3 deletions
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)
);
}