summaryrefslogtreecommitdiff
path: root/nuttx/arch/x86/src/i486/up_initialstate.c
diff options
context:
space:
mode:
Diffstat (limited to 'nuttx/arch/x86/src/i486/up_initialstate.c')
-rw-r--r--nuttx/arch/x86/src/i486/up_initialstate.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/nuttx/arch/x86/src/i486/up_initialstate.c b/nuttx/arch/x86/src/i486/up_initialstate.c
index 1a13b8991..9ca40feb3 100644
--- a/nuttx/arch/x86/src/i486/up_initialstate.c
+++ b/nuttx/arch/x86/src/i486/up_initialstate.c
@@ -85,7 +85,10 @@ void up_initial_state(_TCB *tcb)
memset(xcp, 0, sizeof(struct xcptcontext));
- /* Save the initial stack pointer */
+ /* Save the initial stack pointer... the value of the stackpointer before
+ * the "interrupt occurs." We don't know the value of REG_ESP yet..
+ * that depends on if a priority change is required or not.
+ */
xcp->regs[REG_SP] = (uint32_t)tcb->adj_stack_ptr;