summaryrefslogtreecommitdiff
path: root/nuttx/arch/x86/src/i486/up_initialstate.c
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2011-03-17 22:33:49 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2011-03-17 22:33:49 +0000
commitfd5f3bf64dd35754e44942f99352d70fc71ae73b (patch)
treea6c358055f5af4656b1e85849c75a9279323c25a /nuttx/arch/x86/src/i486/up_initialstate.c
parentc986d73e782c6b7f59c8d79185d845f16d5f6034 (diff)
downloadpx4-nuttx-fd5f3bf64dd35754e44942f99352d70fc71ae73b.tar.gz
px4-nuttx-fd5f3bf64dd35754e44942f99352d70fc71ae73b.tar.bz2
px4-nuttx-fd5f3bf64dd35754e44942f99352d70fc71ae73b.zip
Fix QEMU timer interrupt handler
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3389 42af7a65-404d-4744-a932-0658087f49c3
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;