summaryrefslogtreecommitdiff
path: root/nuttx/arch/x86
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2011-04-08 18:42:26 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2011-04-08 18:42:26 +0000
commit47ebc42ac1eebdd9b33d22adfd91c56b50016ef9 (patch)
treeebe748f797b72d262a970379d945a8546a7208fe /nuttx/arch/x86
parent2e30a3f65595e997fd3a6648b50a1d07815c39c3 (diff)
downloadpx4-nuttx-47ebc42ac1eebdd9b33d22adfd91c56b50016ef9.tar.gz
px4-nuttx-47ebc42ac1eebdd9b33d22adfd91c56b50016ef9.tar.bz2
px4-nuttx-47ebc42ac1eebdd9b33d22adfd91c56b50016ef9.zip
Add kernel mode hooks and reminders for other architectures
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3484 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/arch/x86')
-rw-r--r--nuttx/arch/x86/src/i486/up_initialstate.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/nuttx/arch/x86/src/i486/up_initialstate.c b/nuttx/arch/x86/src/i486/up_initialstate.c
index 9ca40feb3..c1bb422da 100644
--- a/nuttx/arch/x86/src/i486/up_initialstate.c
+++ b/nuttx/arch/x86/src/i486/up_initialstate.c
@@ -104,6 +104,17 @@ void up_initial_state(_TCB *tcb)
xcp->regs[REG_CS] = up_getcs();
xcp->regs[REG_SS] = up_getss();
+ /* Set supervisor- or user-mode, depending on how NuttX is configured and
+ * what kind of thread is being started. Disable FIQs in any event
+ *
+ * If the kernel build is not selected, then all threads run in
+ * supervisor-mode.
+ */
+
+#ifdef CONFIG_NUTTX_KERNEL
+# error "Missing logic for the CONFIG_NUTTX_KERNEL build"
+#endif
+
/* Enable or disable interrupts, based on user configuration. If the IF
* bit is set, maskable interrupts will be enabled.
*/