summaryrefslogtreecommitdiff
path: root/src/arch/x86
diff options
context:
space:
mode:
Diffstat (limited to 'src/arch/x86')
-rw-r--r--src/arch/x86/Makefile.inc2
-rw-r--r--src/arch/x86/assembly_entry.S8
2 files changed, 10 insertions, 0 deletions
diff --git a/src/arch/x86/Makefile.inc b/src/arch/x86/Makefile.inc
index 3949e3afa4..e91ddac82d 100644
--- a/src/arch/x86/Makefile.inc
+++ b/src/arch/x86/Makefile.inc
@@ -154,6 +154,8 @@ romstage-$(CONFIG_X86_TOP4G_BOOTMEDIA_MAP) += mmap_boot.c
romstage-y += postcar_loader.c
romstage-$(CONFIG_COLLECT_TIMESTAMPS_TSC) += timestamp.c
romstage-$(CONFIG_HAVE_CF9_RESET) += cf9_reset.c
+romstage-$(CONFIG_COOP_MULTITASKING) += thread.c
+romstage-$(CONFIG_COOP_MULTITASKING) += thread_switch.S
romstage-srcs += $(wildcard $(src)/mainboard/$(MAINBOARDDIR)/romstage.c)
romstage-libs ?=
diff --git a/src/arch/x86/assembly_entry.S b/src/arch/x86/assembly_entry.S
index 6e730273f8..b0e15dc700 100644
--- a/src/arch/x86/assembly_entry.S
+++ b/src/arch/x86/assembly_entry.S
@@ -35,6 +35,14 @@ _start:
/* reset stack pointer to CAR/EARLYRAM stack */
mov $_STACK_TOP, %esp
+#if CONFIG(COOP_MULTITASKING)
+ /* Push the thread pointer. */
+ push $0
+#endif
+ /* Push the CPU index and struct CPU */
+ push $0
+ push $0
+
/* clear .bss section as it is not shared */
cld
xor %eax, %eax