Fix some bad syscall dispatching log. This change is not testable until these is a tested NuttX kernel build.

git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5713 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
patacongo
2013-03-06 19:56:32 +00:00
parent 4ee41237bd
commit bd1488bdab
11 changed files with 344 additions and 423 deletions
+7 -1
View File
@@ -147,11 +147,11 @@
#ifndef __ASSEMBLY__
struct xcptcontext
{
#ifndef CONFIG_DISABLE_SIGNALS
/* The following function pointer is non-zero if there
* are pending signals to be processed.
*/
#ifndef CONFIG_DISABLE_SIGNALS
void *sigdeliver; /* Actual type is sig_deliver_t */
/* These are saved copies of LR, PRIMASK, and xPSR used during
@@ -163,6 +163,12 @@ struct xcptcontext
uint32_t saved_xpsr;
#endif
#ifdef CONFIG_NUTTX_KERNEL
/* The following holds the return address from a system call */
uint32_t sysreturn;
#endif
/* Register save area */
uint32_t regs[XCPTCONTEXT_REGS];
+7 -1
View File
@@ -106,11 +106,11 @@
#ifndef __ASSEMBLY__
struct xcptcontext
{
#ifndef CONFIG_DISABLE_SIGNALS
/* The following function pointer is non-zero if there
* are pending signals to be processed.
*/
#ifndef CONFIG_DISABLE_SIGNALS
void *sigdeliver; /* Actual type is sig_deliver_t */
/* These are saved copies of LR, PRIMASK, and xPSR used during
@@ -126,6 +126,12 @@ struct xcptcontext
uint32_t saved_xpsr;
#endif
#ifdef CONFIG_NUTTX_KERNEL
/* The following holds the return address from a system call */
uint32_t sysreturn;
#endif
/* Register save area */
uint32_t regs[XCPTCONTEXT_REGS];
+14 -5
View File
@@ -51,15 +51,15 @@
************************************************************************************/
/* Configuration ********************************************************************/
/* This logic uses three system calls {0,1,2} for context switching. The first three
* syscall values must be reserved.
/* This logic uses three system calls {0,1,2} for context switching and one for the
* syscall return. The first four syscall values must be reserved.
*/
#ifdef CONFIG_NUTTX_KERNEL
# ifndef CONFIG_SYS_RESERVED
# error "CONFIG_SYS_RESERVED must be defined to the value 3"
# elif CONFIG_SYS_RESERVED != 3
# error "CONFIG_SYS_RESERVED must have the value 3"
# error "CONFIG_SYS_RESERVED must be defined to the value 4"
# elif CONFIG_SYS_RESERVED != 4
# error "CONFIG_SYS_RESERVED must have the value 4"
# endif
#endif
@@ -86,6 +86,15 @@
#define SYS_switch_context (2)
#ifdef CONFIG_NUTTX_KERNEL
/* SYS call 3:
*
* void up_syscall_return(void);
*/
#define SYS_syscall_return (3)
#endif
/************************************************************************************
* Inline Functions
************************************************************************************/
File diff suppressed because it is too large Load Diff
+15 -6
View File
@@ -1,7 +1,7 @@
/************************************************************************************
* arch/arm/src/armv7-m/svcall.h
*
* Copyright (C) 2011 Gregory Nutt. All rights reserved.
* Copyright (C) 2011, 2013 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@@ -51,15 +51,15 @@
************************************************************************************/
/* Configuration ********************************************************************/
/* This logic uses three system calls {0,1,2} for context switching. The first three
* syscall values must be reserved.
/* This logic uses three system calls {0,1,2} for context switching and one for the
* syscall return. The first four syscall values must be reserved.
*/
#ifdef CONFIG_NUTTX_KERNEL
# ifndef CONFIG_SYS_RESERVED
# error "CONFIG_SYS_RESERVED must be defined to the value 3"
# elif CONFIG_SYS_RESERVED != 3
# error "CONFIG_SYS_RESERVED must have the value 3"
# error "CONFIG_SYS_RESERVED must be defined to the value 4"
# elif CONFIG_SYS_RESERVED != 4
# error "CONFIG_SYS_RESERVED must have the value 4"
# endif
#endif
@@ -86,6 +86,15 @@
#define SYS_switch_context (2)
#ifdef CONFIG_NUTTX_KERNEL
/* SYS call 3:
*
* void up_syscall_return(void);
*/
#define SYS_syscall_return (3)
#endif
/************************************************************************************
* Inline Functions
************************************************************************************/
File diff suppressed because it is too large Load Diff
+4
View File
@@ -38,6 +38,10 @@
****************************************************************************/
#include <nuttx/config.h>
#include <stdint.h>
#include <assert.h>
#include <arch/board/user_map.h>
#ifdef CONFIG_NUTTX_KERNEL
+8 -2
View File
@@ -1,7 +1,7 @@
/****************************************************************************
* arch/mips/include/mips32/irq.h
*
* Copyright (C) 2011 Gregory Nutt. All rights reserved.
* Copyright (C) 2011, 2013 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@@ -310,11 +310,11 @@
struct xcptcontext
{
#ifndef CONFIG_DISABLE_SIGNALS
/* The following function pointer is non-NULL if there are pending signals
* to be processed.
*/
#ifndef CONFIG_DISABLE_SIGNALS
void *sigdeliver; /* Actual type is sig_deliver_t */
/* These additional register save locations are used to implement the
@@ -325,6 +325,12 @@ struct xcptcontext
uint32_t saved_status; /* Status with interrupts disabled. */
#endif
#ifdef CONFIG_NUTTX_KERNEL
/* The following holds the return address from a system call */
uint32_t sysreturn;
#endif
/* Register save area */
uint32_t regs[XCPTCONTEXT_REGS];
+21 -7
View File
@@ -1,7 +1,7 @@
/****************************************************************************
* arch/mips/include/mips32/syscall.h
*
* Copyright (C) 2011-2012 Gregory Nutt. All rights reserved.
* Copyright (C) 2011-2013 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@@ -57,15 +57,17 @@
#define SYS_syscall 0x00
/* Configuration ********************************************************************/
/* This logic uses three system calls {0,1,2} for context switching. The first three
* syscall values must be reserved.
/* SYS call 1 and 2 are defined for internal use by the PIC32MX port (see
* arch/mips/include/mips32/syscall.h). In addition, SYS call 3 is the return from
* a SYS call in kernel mode. The first four syscall values must, therefore, be
* reserved (0 is not used).
*/
#ifdef CONFIG_NUTTX_KERNEL
# ifndef CONFIG_SYS_RESERVED
# error "CONFIG_SYS_RESERVED must be defined to the value 2"
# elif CONFIG_SYS_RESERVED != 2
# error "CONFIG_SYS_RESERVED must have the value 2"
# error "CONFIG_SYS_RESERVED must be defined to the value 4"
# elif CONFIG_SYS_RESERVED != 4
# error "CONFIG_SYS_RESERVED must have the value 4"
# endif
#endif
@@ -148,6 +150,8 @@
/* Context switching system calls ***************************************************/
/* SYS call 0: (not used) */
/* SYS call 1:
*
* void up_fullcontextrestore(uint32_t *restoreregs) noreturn_function;
@@ -166,6 +170,16 @@
#define up_switchcontext(saveregs, restoreregs) \
(void)sys_call2(SYS_switch_context, (uintptr_t)saveregs, (uintptr_t)restoreregs)
#ifdef CONFIG_NUTTX_KERNEL
/* SYS call 3:
*
* void up_syscall_return(void);
*/
#define SYS_syscall_return (3)
#define up_syscall_return() (void)sys_call0(SYS_syscall_return)
#endif
#endif /* __ASSEMBLY__ */
/****************************************************************************
File diff suppressed because it is too large Load Diff
+9 -7
View File
@@ -1,7 +1,7 @@
/************************************************************************************
* arch/mips/src/pic32mx/pic32mx-config.h
*
* Copyright (C) 2011-2012 Gregory Nutt. All rights reserved.
* Copyright (C) 2011-2013 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@@ -485,15 +485,17 @@
#endif
/* SYS calls ************************************************************************/
/* SYS call 0 and 1 are defined for internal use by the PIC32MX port (see
* arch/mips/include/mips32/syscall.h
/* SYS call 1 and 2 are defined for internal use by the PIC32MX port (see
* arch/mips/include/mips32/syscall.h). In addition, SYS call 3 is the return from
* a SYS call in kernel mode. The first four syscall values must, therefore, be
* reserved (0 is not used).
*/
#ifdef CONFIG_NUTTX_KERNEL
# if !defined(CONFIG_SYS_RESERVED) || CONFIG_SYS_RESERVED < 2
# error "CONFIG_SYS_RESERVED must be defined to be 2 for a kernel build"
# elif CONFIG_SYS_RESERVED > 2
# warning "CONFIG_SYS_RESERVED should be defined to be 2 for a kernel build"
# if !defined(CONFIG_SYS_RESERVED) || CONFIG_SYS_RESERVED < 4
# error "CONFIG_SYS_RESERVED must be defined to be 4 for a kernel build"
# elif CONFIG_SYS_RESERVED > 4
# warning "CONFIG_SYS_RESERVED should be defined to be 4 for a kernel build"
# endif
#endif