nios2: set initial stack pointer to the interrupt stack

Change-Id: I5a71215dde9e7fdc7d5d9de5297f5f493de40ca8
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
This commit is contained in:
Andrew Boie 2016-05-09 16:56:35 -07:00 committed by Anas Nashif
commit 31e8030c05

View file

@ -62,9 +62,13 @@ SECTION_FUNC(TEXT, __text_start)
* ZEP-275
*/
/* Set up the initial stack pointer
* ZEP-269
*/
/* Set up the initial stack pointer to the interrupt stack, safe
* to use this as the CPU boots up with interrupts disabled and we
* don't turn them on until much later, when the kernel is on
* the main stack */
movhi sp, %hi(_interrupt_stack)
ori sp, sp, %lo(_interrupt_stack)
addi sp, sp, CONFIG_ISR_STACK_SIZE
/* TODO Setup the global pointer
* ZEP-272