From 34352d16a96b8096094274dddae98e37939857b9 Mon Sep 17 00:00:00 2001 From: "Ronald G. Minnich" Date: Wed, 21 Aug 2013 16:03:32 -0700 Subject: Possible thread stack implementation. Architecture provides a function for thread stack base, thread code uses it. Build and boot tested on Falco with multitasking on and off. Change-Id: I5016fab47f9954379acf7702ac7965b0a70c88ed Signed-off-by: Ronald G. Minnich Reviewed-on: https://gerrit.chromium.org/gerrit/66578 Reviewed-by: Aaron Durbin Commit-Queue: Ronald G. Minnich Tested-by: Ronald G. Minnich (cherry picked from commit 3c6afef30c1a0ad6fba0fb76acc792184d924247) Signed-off-by: Isaac Christensen Reviewed-on: http://review.coreboot.org/6513 Tested-by: build bot (Jenkins) Reviewed-by: Edward O'Callaghan --- src/lib/thread.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/lib/thread.c') diff --git a/src/lib/thread.c b/src/lib/thread.c index 6508bfad14..089ae3f04a 100644 --- a/src/lib/thread.c +++ b/src/lib/thread.c @@ -28,7 +28,6 @@ static void idle_thread_init(void); /* There needs to be at least one thread to run the ramstate state machine. */ #define TOTAL_NUM_THREADS (CONFIG_NUM_THREADS + 1) -extern char thread_stacks[CONFIG_NUM_THREADS*CONFIG_STACK_SIZE]; /* Storage space for the thread structs .*/ static struct thread all_threads[TOTAL_NUM_THREADS]; @@ -259,8 +258,11 @@ void threads_initialize(void) { int i; struct thread *t; - char *stack_top; + u8 *stack_top; struct cpu_info *ci; + u8 *thread_stacks; + + thread_stacks = arch_get_thread_stackbase(); /* Initialize the BSP thread first. The cpu_info structure is assumed * to be just under the top of the stack. */ -- cgit v1.2.3