summaryrefslogtreecommitdiffstats
path: root/src/cpu/intel/model_2065x/cache_as_ram.inc
diff options
context:
space:
mode:
Diffstat (limited to 'src/cpu/intel/model_2065x/cache_as_ram.inc')
-rw-r--r--src/cpu/intel/model_2065x/cache_as_ram.inc10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/cpu/intel/model_2065x/cache_as_ram.inc b/src/cpu/intel/model_2065x/cache_as_ram.inc
index 269fbeffc74e..51af5c69d2f8 100644
--- a/src/cpu/intel/model_2065x/cache_as_ram.inc
+++ b/src/cpu/intel/model_2065x/cache_as_ram.inc
@@ -170,7 +170,12 @@ clear_var_mtrrs:
before_romstage:
post_code(0x29)
/* Call romstage.c main function. */
- call main
+ call romstage_main
+
+ /* Save return value from romstage_main. It contains the stack to use
+ * after cache-as-ram is torn down.
+ */
+ movl %eax, %ebx
post_code(0x2f)
@@ -272,7 +277,8 @@ __main:
post_code(POST_PREPARE_RAMSTAGE)
cld /* Clear direction flag. */
- movl $CONFIG_RAMTOP, %esp
+ /* Setup stack as indicated by return value from romstage_main(). */
+ movl %ebx, %esp
movl %esp, %ebp
call copy_and_run