1 /* SPDX-License-Identifier: GPL-2.0-only */
4 * This path is for stages that are post bootblock. The gdt is reloaded
5 * to accommodate platforms that are executing out of CAR. In order to
6 * continue with C code execution one needs to set stack pointer and
7 * clear .bss variables that are stage specific.
10 #if CONFIG(RESET_VECTOR_IN_RAM)
11 #define _STACK_TOP _eearlyram_stack
13 #define _STACK_TOP _ecar_stack
22 .section ".text._start", "ax", @progbits
26 /* Migrate GDT to this text segment */
33 /* reset stack pointer to CAR/EARLYRAM stack */
36 #if ENV_SEPARATE_DATA_AND_BSS
37 /* clear .bss section as it is not shared */
46 /* Copy .data section content to Cache-As-Ram */
51 movl $(_data_load),%esi
55 #if ((ENV_SEPARATE_VERSTAGE && CONFIG(VERSTAGE_DEBUG_SPINLOOP)) \
56 || (ENV_SEPARATE_ROMSTAGE && CONFIG(ROMSTAGE_DEBUG_SPINLOOP)))
58 /* Wait for a JTAG debugger to break in and set EBX non-zero */
66 andl $0xfffffff0, %esp
67 #if CONFIG(IDT_IN_EVERY_STAGE)
71 #if CONFIG(ASAN_IN_ROMSTAGE)
76 /* Expect to never return. */