[coreboot] r1127 - coreboot-v3/arch/x86

svn at coreboot.org svn at coreboot.org
Tue Feb 10 23:35:49 CET 2009


Author: mjones
Date: 2009-02-10 23:35:49 +0100 (Tue, 10 Feb 2009)
New Revision: 1127

Modified:
   coreboot-v3/arch/x86/stage1.c
Log:
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 at gmail.com>
Acked-by: Peter Stuge <peter at stuge.se>



Modified: coreboot-v3/arch/x86/stage1.c
===================================================================
--- coreboot-v3/arch/x86/stage1.c	2009-02-09 22:25:59 UTC (rev 1126)
+++ coreboot-v3/arch/x86/stage1.c	2009-02-10 22:35:49 UTC (rev 1127)
@@ -187,7 +187,7 @@
  * 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;





More information about the coreboot mailing list