armv7/exynos5250: fix usage of _stack and _estack
This patch fixes up the usage of stack pointer and regions. The current approach only works by coincidence, so this fixes a few things at once to get it into a working state and allow us to use checkstack() again: - Add a STACK_SIZE Kconfig variable. Earlier on it was evaluated to 0. - Assign _stack and _estack using CPU-specific Kconfig variables since it may reside elsewhere in memory (not necessarily DRAM). - Make the existing IRAM stack variables more useful in this context. Change-Id: I4ca5b5680c9ea7e26b1b2b6b3890e028188b51c2 Signed-off-by: David Hendricks <dhendrix@chromium.org> Reviewed-on: http://review.coreboot.org/2416 Reviewed-by: Ronald G. Minnich <rminnich@gmail.com> Tested-by: build bot (Jenkins)
This commit is contained in:
@@ -94,4 +94,4 @@ wait_for_interrupt:
|
||||
*/
|
||||
.align 2
|
||||
.Stack:
|
||||
.word CONFIG_IRAM_STACK
|
||||
.word CONFIG_STACK_TOP
|
||||
|
@@ -99,15 +99,6 @@ SECTIONS
|
||||
* this line.
|
||||
*/
|
||||
|
||||
. = ALIGN(CONFIG_STACK_SIZE);
|
||||
|
||||
_stack = .;
|
||||
.stack . : {
|
||||
/* Reserve a stack for each possible cpu */
|
||||
. += CONFIG_MAX_CPUS*CONFIG_STACK_SIZE;
|
||||
}
|
||||
_estack = .;
|
||||
|
||||
_heap = .;
|
||||
.heap . : {
|
||||
/* Reserve CONFIG_HEAP_SIZE bytes for the heap */
|
||||
@@ -116,6 +107,9 @@ SECTIONS
|
||||
}
|
||||
_eheap = .;
|
||||
|
||||
_stack = CONFIG_STACK_BOTTOM;
|
||||
_estack = CONFIG_STACK_TOP;
|
||||
|
||||
/* The ram segment. This includes all memory used by the memory
|
||||
* resident copy of coreboot, except the tables that are produced on
|
||||
* the fly, but including stack and heap.
|
||||
|
Reference in New Issue
Block a user