summaryrefslogtreecommitdiff
path: root/arch/x86
diff options
context:
space:
mode:
authorGabe Black <gabeblack@chromium.org>2011-10-07 18:58:38 -0700
committerGabe Black (Do Not Use) <gabeblack@google.com>2011-10-07 19:10:52 -0700
commit1381f0ac0239de6530be0b8416e78b05a7e8dd5c (patch)
treef2a0eedd25d2972fec942781ce975ec7dd2233d3 /arch/x86
parenta67ef11137df3176e9c8c78e06d0e159eb9de1f6 (diff)
Fix the inline assembly constraints in boot_zimage
It's possible that the compiler will decide to put the kernel entry point into register %ebp which the assembly blob will set to 0 manually before it's used. These new constraints will force it to use %eax for the kernel entry point, and also tell it that the %ebp register is modified. BUG=None TEST=Built and booted on Stumpy and verified that the crash entering the kernel no longer happens. Change-Id: Iae321543e610f2084957978e438e91b1081dbc89 Signed-off-by: Gabe Black <gabeblack@google.com> Reviewed-on: http://gerrit.chromium.org/gerrit/9764 Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
Diffstat (limited to 'arch/x86')
-rw-r--r--arch/x86/lib/zimage.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/x86/lib/zimage.c b/arch/x86/lib/zimage.c
index 20abc98417..2e8a942294 100644
--- a/arch/x86/lib/zimage.c
+++ b/arch/x86/lib/zimage.c
@@ -300,9 +300,10 @@ void boot_zimage(void *setup_base, void *load_address)
"movl $0, %%ebp \n"
"cli \n"
"jmp %[kernel_entry] \n"
- :: [kernel_entry]"r"(load_address),
+ :: [kernel_entry]"a"(load_address),
[boot_params] "S"(setup_base),
"b"(0), "D"(0)
+ : "%ebp"
);
#else
struct pt_regs regs;