From 47ebc42ac1eebdd9b33d22adfd91c56b50016ef9 Mon Sep 17 00:00:00 2001 From: patacongo Date: Fri, 8 Apr 2011 18:42:26 +0000 Subject: 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 --- nuttx/arch/x86/src/i486/up_initialstate.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'nuttx/arch/x86') 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. */ -- cgit v1.2.3