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
This commit is contained in:
Marc Jones 2009-02-10 22:35:49 +00:00
commit 333cdb149f

View file

@ -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;