x86: add thread support
Thread support is added for the x86 architecture. Both the local apic and the tsc udelay() functions have a call to thread_yield_microseconds() so as to provide an opportunity to run pending threads. Change-Id: Ie39b9eb565eb189676c06645bdf2a8720fe0636a Signed-off-by: Aaron Durbin <adurbin@chromium.org> Reviewed-on: http://review.coreboot.org/3207 Tested-by: build bot (Jenkins) Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
This commit is contained in:
committed by
Ronald G. Minnich
parent
4409a5eef6
commit
38c326d041
@ -10,6 +10,11 @@
|
||||
_stack:
|
||||
.space CONFIG_MAX_CPUS*CONFIG_STACK_SIZE
|
||||
_estack:
|
||||
#if CONFIG_COOP_MULTITASKING
|
||||
.global thread_stacks
|
||||
thread_stacks:
|
||||
.space CONFIG_STACK_SIZE*CONFIG_NUM_THREADS
|
||||
#endif
|
||||
|
||||
.section ".textfirst", "ax", @progbits
|
||||
.code32
|
||||
@ -45,6 +50,10 @@ _start:
|
||||
/* set new stack */
|
||||
movl $_estack, %esp
|
||||
|
||||
#if CONFIG_COOP_MULTITASKING
|
||||
/* Push the thread pointer. */
|
||||
pushl $0
|
||||
#endif
|
||||
/* Push the cpu index and struct cpu */
|
||||
pushl $0
|
||||
pushl $0
|
||||
|
Reference in New Issue
Block a user