Add xtensa.h (which is call up_internal.h in other architectures.

This commit is contained in:
Gregory Nutt
2016-10-15 11:45:15 -06:00
parent 0a0278a3ca
commit 4621784617
14 changed files with 28 additions and 28 deletions
+2 -2
View File
@@ -158,9 +158,9 @@ struct xcptcontext
uint32_t saved_cpsr; uint32_t saved_cpsr;
#endif #endif
/* Register save area */ /* Pointer to the register save area on the stack*/
uint32_t regs[XCPTCONTEXT_REGS]; uint32_t *regs;
#ifdef CONFIG_LIB_SYSCALL #ifdef CONFIG_LIB_SYSCALL
/* The following array holds the return address and the exc_return value /* The following array holds the return address and the exc_return value
+14 -14
View File
@@ -1,7 +1,7 @@
/**************************************************************************** /****************************************************************************
* arch/xtensa/common/xtensa_internal.h * arch/xtensa/common/xtensa.h
* *
* Copyright (C) 2011, 2012, 2015 Gregory Nutt. All rights reserved. * Copyright (C) 2016 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org> * Author: Gregory Nutt <gnutt@nuttx.org>
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@@ -33,8 +33,8 @@
* *
****************************************************************************/ ****************************************************************************/
#ifndef __ARCH_XTENSA_SRC_COMMON_XTENSA_INTERNAL_H #ifndef __ARCH_XTENSA_SRC_COMMON_XTENSA_H
#define __ARCH_XTENSA_SRC_COMMON_XTENSA_INTERNAL_H #define __ARCH_XTENSA_SRC_COMMON_XTENSA_H
/**************************************************************************** /****************************************************************************
* Included Files * Included Files
@@ -104,12 +104,12 @@
# define CONFIG_ARCH_INTERRUPTSTACK 0 # define CONFIG_ARCH_INTERRUPTSTACK 0
#endif #endif
/* In the XTENSA model, the state is copied from the stack to the TCB, but /* In the XTENSA model, only a pointer to register state on the stack is
* only a referenced is passed to get the state from the TCB. * saved in the TCB.
*/ */
#define up_savestate(regs) up_copystate(regs, (uint32_t*)g_current_regs) #define up_savestate(regs) do { reg = g_current_regs; } while (0)
#define up_restorestate(regs) (g_current_regs = regs) #define up_restorestate(regs) do { g_current_regs = regs; } while (0)
/**************************************************************************** /****************************************************************************
* Public Types * Public Types
@@ -183,7 +183,7 @@ extern uint32_t _bmxdupba_address; /* BMX register setting */
#ifndef __ASSEMBLY__ #ifndef __ASSEMBLY__
/* Common Functions *********************************************************/ /* Common Functions *********************************************************/
/* Common functions define in arch/xtensa/src/common. These may be replaced /* Common functions define in arch/mips/src/common. These may be replaced
* with chip-specific functions of the same name if needed. See also * with chip-specific functions of the same name if needed. See also
* functions prototyped in include/nuttx/arch.h. * functions prototyped in include/nuttx/arch.h.
*/ */
@@ -213,21 +213,21 @@ void up_dumpstate(void);
# define up_dumpstate() # define up_dumpstate()
#endif #endif
/* Common XTENSA32 functions defined in arch/xtensa/src/XTENSA32 */ /* Common XTENSA functions */
/* IRQs */ /* IRQs */
uint32_t *up_doirq(int irq, uint32_t *regs); uint32_t *up_doirq(int irq, uint32_t *regs);
/* Software interrupt 0 handler */ /* Software interrupt handler */
int up_swint0(int irq, FAR void *context); int up_swint(int irq, FAR void *context);
/* Signals */ /* Signals */
void up_sigdeliver(void); void up_sigdeliver(void);
/* Chip-specific functions **************************************************/ /* Chip-specific functions **************************************************/
/* Chip specific functions defined in arch/xtensa/src/<chip> */ /* Chip specific functions defined in arch/mips/src/<chip> */
/* IRQs */ /* IRQs */
void up_irqinitialize(void); void up_irqinitialize(void);
@@ -282,4 +282,4 @@ void up_usbuninitialize(void);
#endif #endif
#endif /* __ASSEMBLY__ */ #endif /* __ASSEMBLY__ */
#endif /* __ARCH_XTENSA_SRC_COMMON_XTENSA_INTERNAL_H */ #endif /* __ARCH_XTENSA_SRC_COMMON_XTENSA_H */
+1 -1
View File
@@ -47,7 +47,7 @@
#include <arch/board/board.h> #include <arch/board/board.h>
#include "up_arch.h" #include "up_arch.h"
#include "up_internal.h" #include "xtensa.h"
/**************************************************************************** /****************************************************************************
* Pre-processor Definitions * Pre-processor Definitions
+1 -1
View File
@@ -50,7 +50,7 @@
#include <arch/board/board.h> #include <arch/board/board.h>
#include "up_arch.h" #include "up_arch.h"
#include "up_internal.h" #include "xtensa.h"
/**************************************************************************** /****************************************************************************
* Pre-processor Macros * Pre-processor Macros
+1 -1
View File
@@ -39,7 +39,7 @@
#include <nuttx/config.h> #include <nuttx/config.h>
#include "up_internal.h" #include "xtensa.h"
/**************************************************************************** /****************************************************************************
* Pre-processor Definitions * Pre-processor Definitions
+1 -1
View File
@@ -52,7 +52,7 @@
#include "task/task.h" #include "task/task.h"
#include "sched/sched.h" #include "sched/sched.h"
#include "group/group.h" #include "group/group.h"
#include "up_internal.h" #include "xtensa.h"
/**************************************************************************** /****************************************************************************
* Pre-processor Definitions * Pre-processor Definitions
+1 -1
View File
@@ -41,7 +41,7 @@
#include <nuttx/irq.h> #include <nuttx/irq.h>
#include <nuttx/arch.h> #include <nuttx/arch.h>
#include "up_internal.h" #include "xtensa.h"
/**************************************************************************** /****************************************************************************
* Public Functions * Public Functions
+1 -1
View File
@@ -58,7 +58,7 @@
#include <arch/board/board.h> #include <arch/board/board.h>
#include "up_arch.h" #include "up_arch.h"
#include "up_internal.h" #include "xtensa.h"
/**************************************************************************** /****************************************************************************
* Private Functions * Private Functions
@@ -43,7 +43,7 @@
#include <nuttx/arch.h> #include <nuttx/arch.h>
#include <nuttx/irq.h> #include <nuttx/irq.h>
#include "up_internal.h" #include "xtensa.h"
/**************************************************************************** /****************************************************************************
* Private Types * Private Types
+1 -1
View File
@@ -39,7 +39,7 @@
#include <nuttx/config.h> #include <nuttx/config.h>
#include "up_internal.h" #include "xtensa.h"
/**************************************************************************** /****************************************************************************
* Pre-processor Definitions * Pre-processor Definitions
+1 -1
View File
@@ -40,7 +40,7 @@
#include <nuttx/config.h> #include <nuttx/config.h>
#include <nuttx/arch.h> #include <nuttx/arch.h>
#include "up_internal.h" #include "xtensa.h"
/**************************************************************************** /****************************************************************************
* Pre-processor Definitions * Pre-processor Definitions
+1 -1
View File
@@ -45,7 +45,7 @@
#include <nuttx/arch.h> #include <nuttx/arch.h>
#include <nuttx/kmalloc.h> #include <nuttx/kmalloc.h>
#include "up_internal.h" #include "xtensa.h"
/**************************************************************************** /****************************************************************************
* Private Types * Private Types
+1 -1
View File
@@ -46,7 +46,7 @@
#include <nuttx/arch.h> #include <nuttx/arch.h>
#include "up_internal.h" #include "xtensa.h"
/**************************************************************************** /****************************************************************************
* Pre-processor Macros * Pre-processor Macros
+1 -1
View File
@@ -47,7 +47,7 @@
#include <nuttx/kmalloc.h> #include <nuttx/kmalloc.h>
#include <nuttx/arch.h> #include <nuttx/arch.h>
#include "up_internal.h" #include "xtensa.h"
/**************************************************************************** /****************************************************************************
* Pre-processor Definitions * Pre-processor Definitions