aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/arch/x86/exit_car.S14
-rw-r--r--src/drivers/intel/fsp1_1/exit_car.S2
-rw-r--r--src/soc/intel/common/block/cpu/car/exit_car_fsp.S2
3 files changed, 16 insertions, 2 deletions
diff --git a/src/arch/x86/exit_car.S b/src/arch/x86/exit_car.S
index 9b89ffbdf9..d3954d365f 100644
--- a/src/arch/x86/exit_car.S
+++ b/src/arch/x86/exit_car.S
@@ -35,6 +35,18 @@ post_car_stack_top:
.endm
#endif
+/* Place the stack in the bss section. It's not necessary to define it in the
+ * the linker script. */
+ .section .bss, "aw", @nobits
+.global _stack
+.global _estack
+.global _stack_size
+
+_stack:
+.space CONFIG_STACK_SIZE
+_estack:
+.set _stack_size, _estack - _stack
+
.text
.global _start
_start:
@@ -174,8 +186,10 @@ skip_clflush:
wrmsr
#endif /* CONFIG_SOC_SETS_MSRS */
+ movl $_estack, %esp
/* Align stack to 16 bytes at call instruction. */
andl $0xfffffff0, %esp
+
/* Call into main for postcar. */
call main
/* Should never return. */
diff --git a/src/drivers/intel/fsp1_1/exit_car.S b/src/drivers/intel/fsp1_1/exit_car.S
index dbdd3e60be..2671de5825 100644
--- a/src/drivers/intel/fsp1_1/exit_car.S
+++ b/src/drivers/intel/fsp1_1/exit_car.S
@@ -7,7 +7,7 @@ chipset_teardown_car:
pop %ebx
/* Move the stack pointer to real RAM */
- movl post_car_stack_top, %esp
+ movl _estack, %esp
/* Align the stack 16 bytes */
andl $0xfffffff0, %esp
diff --git a/src/soc/intel/common/block/cpu/car/exit_car_fsp.S b/src/soc/intel/common/block/cpu/car/exit_car_fsp.S
index 4b906280e6..4d35447a56 100644
--- a/src/soc/intel/common/block/cpu/car/exit_car_fsp.S
+++ b/src/soc/intel/common/block/cpu/car/exit_car_fsp.S
@@ -17,7 +17,7 @@
chipset_teardown_car:
/* Set up new stack. */
- mov post_car_stack_top, %esp
+ mov _estack, %esp
/* Align the stack. */
andl $0xfffffff0, %esp