diff options
author | Marc Jones <marcj303@gmail.com> | 2009-02-10 22:35:49 +0000 |
---|---|---|
committer | Marc Jones <marcj303@gmail.com> | 2009-02-10 22:35:49 +0000 |
commit | 333cdb149f0afcbcf1d16a3011745c283848128d (patch) | |
tree | ab6006ddf9977d04a1438d8317e01ee29d68657c | |
parent | 502c22bf1349a9e31b6e86d4d45e2d2d3e908678 (diff) | |
download | coreboot-333cdb149f0afcbcf1d16a3011745c283848128d.tar.gz coreboot-333cdb149f0afcbcf1d16a3011745c283848128d.tar.bz2 coreboot-333cdb149f0afcbcf1d16a3011745c283848128d.zip |
Coreboot uses the compiler option -mregparm=3 which causes variables to
be passed in registers. This is good for size and speed but not good when
we call a C function from asm. Force stage1_phase1 to use stdcall and get
variables off the stack.
Note that I didn't change stage1_phase3 because it doesn't use any
variables.
Signed-off-by: Marc Jones <marcj303@gmail.com>
Acked-by: Peter Stuge <peter@stuge.se>
git-svn-id: svn://coreboot.org/repository/coreboot-v3@1127 f3766cd6-281f-0410-b1cd-43a5c92072e9
-rw-r--r-- | arch/x86/stage1.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/stage1.c b/arch/x86/stage1.c index 7bd0e52a9814..304ee1ffe797 100644 --- a/arch/x86/stage1.c +++ b/arch/x86/stage1.c @@ -187,7 +187,7 @@ static int run_address_multiboot(void *f, struct multiboot_info *mbi) * that we are restarting after some sort of reconfiguration. Note that we could use it on geode but * do not at present. */ -void __attribute__((stdcall)) stage1_phase1(u32 bist, u32 init_detected) +void __attribute__((stdcall, regparm(0))) stage1_phase1(u32 bist, u32 init_detected) { struct global_vars globvars; int ret; |