summaryrefslogtreecommitdiff
path: root/src/arch/x86/assembly_entry.S
diff options
context:
space:
mode:
Diffstat (limited to 'src/arch/x86/assembly_entry.S')
-rw-r--r--src/arch/x86/assembly_entry.S11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/arch/x86/assembly_entry.S b/src/arch/x86/assembly_entry.S
index f36e7dab4d..59b34c8713 100644
--- a/src/arch/x86/assembly_entry.S
+++ b/src/arch/x86/assembly_entry.S
@@ -9,6 +9,13 @@
* continue with C code execution one needs to set stack pointer and
* clear .bss variables that are stage specific.
*/
+
+#if CONFIG(RESET_VECTOR_IN_RAM)
+ #define _STACK_TOP _eearlyram_stack
+#else
+ #define _STACK_TOP _ecar_stack
+#endif
+
.section ".text._start", "ax", @progbits
.global _start
_start:
@@ -16,8 +23,8 @@ _start:
/* Migrate GDT to this text segment */
call gdt_init
- /* reset stack pointer to CAR stack */
- mov $_ecar_stack, %esp
+ /* reset stack pointer to CAR/EARLYRAM stack */
+ mov $_STACK_TOP, %esp
/* clear .bss section as it is not shared */
cld