mirror of
https://github.com/apache/nuttx.git
synced 2026-05-18 00:34:10 +08:00
arch/arm: Add support to disable signals actions related data struct
Add support to disable signals actions related struct Co-authored-by: guoshichao <guoshichao@xiaomi.com> Signed-off-by: Chengdong Wang <wangchengdong@lixiang.com>
This commit is contained in:
committed by
Alan C. Assis
parent
faf864b04f
commit
09b99e5b90
@@ -129,11 +129,13 @@
|
||||
#ifndef __ASSEMBLY__
|
||||
struct xcptcontext
|
||||
{
|
||||
#ifdef CONFIG_ENABLE_ALL_SIGNALS
|
||||
/* These are saved copies of the context used during
|
||||
* signal processing.
|
||||
*/
|
||||
|
||||
uint32_t *saved_regs;
|
||||
#endif
|
||||
|
||||
/* Register save area with XCPTCONTEXT_SIZE, only valid when:
|
||||
* 1.The task isn't running or
|
||||
|
||||
@@ -158,6 +158,7 @@ struct xcpt_syscall_s
|
||||
|
||||
struct xcptcontext
|
||||
{
|
||||
#ifdef CONFIG_ENABLE_ALL_SIGNALS
|
||||
/* These are saved copies of the context used during
|
||||
* signal processing.
|
||||
*/
|
||||
@@ -171,6 +172,7 @@ struct xcptcontext
|
||||
|
||||
uint32_t sigreturn;
|
||||
#endif
|
||||
#endif /* CONFIG_ENABLE_ALL_SIGNALS */
|
||||
|
||||
#ifdef CONFIG_LIB_SYSCALL
|
||||
/* The following array holds the return address and the exc_return value
|
||||
|
||||
@@ -259,6 +259,7 @@ struct xcpt_syscall_s
|
||||
|
||||
struct xcptcontext
|
||||
{
|
||||
#ifdef CONFIG_ENABLE_ALL_SIGNALS
|
||||
/* These are saved copies of the context used during
|
||||
* signal processing.
|
||||
*/
|
||||
@@ -273,6 +274,7 @@ struct xcptcontext
|
||||
uint32_t sigreturn;
|
||||
|
||||
#endif
|
||||
#endif /* CONFIG_ENABLE_ALL_SIGNALS */
|
||||
|
||||
/* Register save area with XCPTCONTEXT_SIZE, only valid when:
|
||||
* 1.The task isn't running or
|
||||
|
||||
@@ -214,6 +214,7 @@ struct xcpt_syscall_s
|
||||
|
||||
struct xcptcontext
|
||||
{
|
||||
#ifdef CONFIG_ENABLE_ALL_SIGNALS
|
||||
/* These are saved copies of the context used during
|
||||
* signal processing.
|
||||
*/
|
||||
@@ -228,6 +229,7 @@ struct xcptcontext
|
||||
uint32_t sigreturn;
|
||||
|
||||
#endif
|
||||
#endif /* CONFIG_ENABLE_ALL_SIGNALS */
|
||||
|
||||
#ifdef CONFIG_LIB_SYSCALL
|
||||
/* The following array holds the return address and the exc_return value
|
||||
|
||||
@@ -259,6 +259,7 @@ struct xcpt_syscall_s
|
||||
|
||||
struct xcptcontext
|
||||
{
|
||||
#ifdef CONFIG_ENABLE_ALL_SIGNALS
|
||||
/* These are saved copies of the context used during
|
||||
* signal processing.
|
||||
*/
|
||||
@@ -272,6 +273,7 @@ struct xcptcontext
|
||||
|
||||
uint32_t sigreturn;
|
||||
#endif
|
||||
#endif /* CONFIG_ENABLE_ALL_SIGNALS */
|
||||
|
||||
/* Register save area with XCPTCONTEXT_SIZE, only valid when:
|
||||
* 1.The task isn't running or
|
||||
|
||||
@@ -225,6 +225,7 @@ struct xcpt_syscall_s
|
||||
|
||||
struct xcptcontext
|
||||
{
|
||||
#ifdef CONFIG_ENABLE_ALL_SIGNALS
|
||||
/* These are saved copies of the context used during
|
||||
* signal processing.
|
||||
*/
|
||||
@@ -239,6 +240,7 @@ struct xcptcontext
|
||||
uint32_t sigreturn;
|
||||
|
||||
#endif
|
||||
#endif /* CONFIG_ENABLE_ALL_SIGNALS */
|
||||
|
||||
#ifdef CONFIG_LIB_SYSCALL
|
||||
/* The following array holds the return address and the exc_return value
|
||||
|
||||
@@ -259,6 +259,7 @@ struct xcpt_syscall_s
|
||||
|
||||
struct xcptcontext
|
||||
{
|
||||
#ifdef CONFIG_ENABLE_ALL_SIGNALS
|
||||
/* These are saved copies of the context used during
|
||||
* signal processing.
|
||||
*/
|
||||
@@ -272,6 +273,7 @@ struct xcptcontext
|
||||
|
||||
uint32_t sigreturn;
|
||||
#endif
|
||||
#endif /* CONFIG_ENABLE_ALL_SIGNALS */
|
||||
|
||||
/* Register save area with XCPTCONTEXT_SIZE, only valid when:
|
||||
* 1.The task isn't running or
|
||||
|
||||
@@ -160,12 +160,13 @@
|
||||
#ifndef __ASSEMBLY__
|
||||
struct xcptcontext
|
||||
{
|
||||
#ifdef CONFIG_ENABLE_ALL_SIGNALS
|
||||
/* These are saved register array pointer used during
|
||||
* signal processing.
|
||||
*/
|
||||
|
||||
uint32_t *saved_regs;
|
||||
|
||||
#endif /* CONFIG_ENABLE_ALL_SIGNALS */
|
||||
/* Register save area */
|
||||
|
||||
uint32_t *regs;
|
||||
|
||||
@@ -29,8 +29,6 @@ list(
|
||||
arm_doirq.c
|
||||
arm_initialstate.c
|
||||
arm_prefetchabort.c
|
||||
arm_schedulesigaction.c
|
||||
arm_sigdeliver.c
|
||||
arm_syscall.c
|
||||
arm_tcbinfo.c
|
||||
arm_undefinedinsn.c
|
||||
@@ -39,6 +37,10 @@ list(
|
||||
arm_vectortab.S
|
||||
arm_saveusercontext.S)
|
||||
|
||||
if(CONFIG_ENABLE_ALL_SIGNALS)
|
||||
list(APPEND SRCS arm_schedulesigaction.c arm_sigdeliver.c)
|
||||
endif()
|
||||
|
||||
if(CONFIG_PAGING)
|
||||
list(APPEND SRCS arm_pginitialize.c arm_checkmapping.c arm_allocpage.c
|
||||
arm_va2pte.c)
|
||||
|
||||
@@ -27,13 +27,17 @@ include common/Make.defs
|
||||
HEAD_ASRC = arm_head.S
|
||||
|
||||
CMN_CSRCS += arm_dataabort.c arm_doirq.c arm_initialstate.c
|
||||
CMN_CSRCS += arm_prefetchabort.c arm_schedulesigaction.c
|
||||
CMN_CSRCS += arm_sigdeliver.c arm_syscall.c arm_tcbinfo.c
|
||||
CMN_CSRCS += arm_prefetchabort.c
|
||||
CMN_CSRCS += arm_syscall.c arm_tcbinfo.c
|
||||
CMN_CSRCS += arm_undefinedinsn.c
|
||||
|
||||
CMN_ASRCS += arm_cache.S arm_vectors.S arm_vectortab.S
|
||||
CMN_ASRCS += arm_saveusercontext.S
|
||||
|
||||
ifeq ($(CONFIG_ENABLE_ALL_SIGNALS),y)
|
||||
CMN_CSRCS += arm_schedulesigaction.c arm_sigdeliver.c
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_LEGACY_PAGING),y)
|
||||
CMN_CSRCS += arm_pginitialize.c arm_checkmapping.c arm_allocpage.c arm_va2pte.c
|
||||
endif
|
||||
|
||||
@@ -182,7 +182,7 @@ arm_vectorirq:
|
||||
/* Call arm_decodeirq() on the interrupt stack */
|
||||
|
||||
ldr sp, .Lirqstacktop /* SP = interrupt stack top */
|
||||
#else
|
||||
#elif defined(CONFIG_ENABLE_ALL_SIGNALS)
|
||||
/* Call arm_decodeirq() on the user stack */
|
||||
|
||||
/* If the interrupt stack is disabled, reserve xcpcontext to ensure
|
||||
|
||||
@@ -27,13 +27,15 @@ set(SRCS
|
||||
arm_doirq.c
|
||||
arm_hardfault.c
|
||||
arm_initialstate.c
|
||||
arm_schedulesigaction.c
|
||||
arm_sigdeliver.c
|
||||
arm_svcall.c
|
||||
arm_systemreset.c
|
||||
arm_tcbinfo.c
|
||||
arm_trigger_irq.c)
|
||||
|
||||
if(CONFIG_ENABLE_ALL_SIGNALS)
|
||||
list(APPEND SRCS arm_schedulesigaction.c arm_sigdeliver.c)
|
||||
endif()
|
||||
|
||||
if(NOT CONFIG_ARCH_HAVE_CUSTOM_VECTORS)
|
||||
list(APPEND SRCS arm_vectors.c)
|
||||
endif()
|
||||
|
||||
@@ -27,10 +27,14 @@ include common/Make.defs
|
||||
CMN_ASRCS += arm_exception.S arm_saveusercontext.S
|
||||
|
||||
CMN_CSRCS += arm_cpuinfo.c arm_doirq.c arm_hardfault.c arm_initialstate.c
|
||||
CMN_CSRCS += arm_schedulesigaction.c arm_sigdeliver.c arm_svcall.c
|
||||
CMN_CSRCS += arm_svcall.c
|
||||
CMN_CSRCS += arm_systemreset.c arm_tcbinfo.c
|
||||
CMN_CSRCS += arm_trigger_irq.c
|
||||
|
||||
ifeq ($(CONFIG_ENABLE_ALL_SIGNALS),y)
|
||||
CMN_CSRCS += arm_schedulesigaction.c arm_sigdeliver.c
|
||||
endif
|
||||
|
||||
ifneq ($(CONFIG_ARCH_HAVE_CUSTOM_VECTORS),y)
|
||||
CMN_CSRCS += arm_vectors.c
|
||||
endif
|
||||
|
||||
@@ -86,6 +86,7 @@ uint32_t *arm_doirq(int irq, uint32_t *regs)
|
||||
|
||||
irq_dispatch(irq, regs);
|
||||
#endif
|
||||
#ifdef CONFIG_ENABLE_ALL_SIGNALS
|
||||
if (tcb->sigdeliver)
|
||||
{
|
||||
/* Pendsv able to access running tcb with no critical section */
|
||||
@@ -93,6 +94,7 @@ uint32_t *arm_doirq(int irq, uint32_t *regs)
|
||||
up_schedule_sigaction(tcb);
|
||||
}
|
||||
|
||||
#endif
|
||||
up_irq_save();
|
||||
}
|
||||
else
|
||||
|
||||
@@ -158,7 +158,9 @@ exception_common:
|
||||
lsls r2, #(31 - EXC_RETURN_THREAD_BITNO) /* Move to bit 31 */
|
||||
bpl 3f /* Test bit 31 */
|
||||
mov r2, r1 /* Reserve signal context */
|
||||
#ifdef CONFIG_ENABLE_ALL_SIGNALS
|
||||
subs r2, r2, #XCPTCONTEXT_SIZE
|
||||
#endif
|
||||
msr msp, r2 /* We are using the main stack pointer */
|
||||
isb sy
|
||||
3:
|
||||
|
||||
@@ -43,14 +43,16 @@ list(
|
||||
arm_initialstate.c
|
||||
arm_mmu.c
|
||||
arm_prefetchabort.c
|
||||
arm_schedulesigaction.c
|
||||
arm_sigdeliver.c
|
||||
arm_syscall.c
|
||||
arm_tcbinfo.c
|
||||
arm_undefinedinsn.c
|
||||
arm_perf.c
|
||||
cp15_cacheops.c)
|
||||
|
||||
if(CONFIG_ENABLE_ALL_SIGNALS)
|
||||
list(APPEND SRCS arm_schedulesigaction.c arm_sigdeliver.c)
|
||||
endif()
|
||||
|
||||
if(CONFIG_ARMV7A_GICv2M)
|
||||
list(APPEND SRCS arm_gicv2m.c)
|
||||
endif()
|
||||
|
||||
@@ -38,10 +38,13 @@ CMN_ASRCS += arm_cpuhead.S arm_vectors.S arm_saveusercontext.S
|
||||
CMN_CSRCS += arm_cache.c arm_cpuinfo.c arm_dataabort.c
|
||||
CMN_CSRCS += arm_doirq.c arm_gicv2.c arm_gicv2_dump.c
|
||||
CMN_CSRCS += arm_initialstate.c arm_mmu.c arm_prefetchabort.c
|
||||
CMN_CSRCS += arm_schedulesigaction.c arm_sigdeliver.c
|
||||
CMN_CSRCS += arm_syscall.c arm_tcbinfo.c arm_undefinedinsn.c
|
||||
CMN_CSRCS += arm_perf.c cp15_cacheops.c
|
||||
|
||||
ifeq ($(CONFIG_ENABLE_ALL_SIGNALS),y)
|
||||
CMN_CSRCS += arm_schedulesigaction.c arm_sigdeliver.c
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_ARMV7A_GICv2M),y)
|
||||
CMN_CSRCS += arm_gicv2m.c
|
||||
endif
|
||||
|
||||
@@ -364,7 +364,7 @@ uint32_t *arm_syscall(uint32_t *regs)
|
||||
break;
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_BUILD_KERNEL
|
||||
#if defined(CONFIG_BUILD_KERNEL) && defined(CONFIG_ENABLE_ALL_SIGNALS)
|
||||
/* R0=SYS_signal_handler: This a user signal handler callback
|
||||
*
|
||||
* void signal_handler(_sa_sigaction_t sighand, int signo,
|
||||
@@ -444,9 +444,7 @@ uint32_t *arm_syscall(uint32_t *regs)
|
||||
#endif
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_BUILD_KERNEL
|
||||
/* R0=SYS_signal_handler_return: This a user signal handler callback
|
||||
*
|
||||
* void signal_handler_return(void);
|
||||
@@ -485,7 +483,7 @@ uint32_t *arm_syscall(uint32_t *regs)
|
||||
#endif
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
#endif /* CONFIG_BUILD_KERNEL && CONFIG_ENABLE_ALL_SIGNALS */
|
||||
|
||||
/* This is not an architecture-specific system call. If NuttX is built
|
||||
* as a standalone kernel with a system call interface, then all of the
|
||||
|
||||
@@ -219,7 +219,7 @@ arm_vectorirq:
|
||||
/* Call arm_decodeirq() on the interrupt stack */
|
||||
|
||||
setirqstack r1, r3 /* SP = interrupt stack top */
|
||||
#else
|
||||
#elif defined(CONFIG_ENABLE_ALL_SIGNALS)
|
||||
/* Call arm_decodeirq() on the user stack */
|
||||
|
||||
/* If the interrupt stack is disabled, reserve xcpcontext to ensure
|
||||
@@ -337,7 +337,8 @@ arm_vectorsvc:
|
||||
/* Call arm_syscall() on the interrupt stack */
|
||||
|
||||
setirqstack r1, r3 /* SP = interrupt stack top */
|
||||
#else
|
||||
|
||||
#elif defined(CONFIG_ENABLE_ALL_SIGNALS)
|
||||
/* Call arm_syscall() on the user stack */
|
||||
|
||||
/* If the interrupt stack is disabled, reserve xcpcontext to ensure
|
||||
|
||||
@@ -34,8 +34,6 @@ set(SRCS
|
||||
arm_itm.c
|
||||
arm_memfault.c
|
||||
arm_perf.c
|
||||
arm_schedulesigaction.c
|
||||
arm_sigdeliver.c
|
||||
arm_svcall.c
|
||||
arm_systemreset.c
|
||||
arm_tcbinfo.c
|
||||
@@ -43,6 +41,10 @@ set(SRCS
|
||||
arm_usagefault.c
|
||||
arm_dbgmonitor.c)
|
||||
|
||||
if(CONFIG_ENABLE_ALL_SIGNALS)
|
||||
list(APPEND SRCS arm_schedulesigaction.c arm_sigdeliver.c)
|
||||
endif()
|
||||
|
||||
if(NOT CONFIG_ARCH_HAVE_CUSTOM_VECTORS)
|
||||
list(APPEND SRCS arm_vectors.c)
|
||||
endif()
|
||||
|
||||
@@ -29,10 +29,13 @@ CMN_ASRCS += arm_exception.S arm_saveusercontext.S
|
||||
CMN_CSRCS += arm_busfault.c arm_cache.c arm_cpuinfo.c arm_doirq.c
|
||||
CMN_CSRCS += arm_hardfault.c arm_initialstate.c arm_itm.c
|
||||
CMN_CSRCS += arm_memfault.c arm_perf.c
|
||||
CMN_CSRCS += arm_schedulesigaction.c arm_sigdeliver.c
|
||||
CMN_CSRCS += arm_svcall.c arm_systemreset.c arm_tcbinfo.c
|
||||
CMN_CSRCS += arm_trigger_irq.c arm_usagefault.c arm_dbgmonitor.c
|
||||
|
||||
ifeq ($(CONFIG_ENABLE_ALL_SIGNALS),y)
|
||||
CMN_CSRCS += arm_schedulesigaction.c arm_sigdeliver.c
|
||||
endif
|
||||
|
||||
ifneq ($(CONFIG_ARCH_HAVE_CUSTOM_VECTORS),y)
|
||||
CMN_CSRCS += arm_vectors.c
|
||||
endif
|
||||
|
||||
@@ -86,6 +86,7 @@ uint32_t *arm_doirq(int irq, uint32_t *regs)
|
||||
|
||||
irq_dispatch(irq, regs);
|
||||
#endif
|
||||
#ifdef CONFIG_ENABLE_ALL_SIGNALS
|
||||
if (tcb->sigdeliver)
|
||||
{
|
||||
/* Pendsv able to access running tcb with no critical section */
|
||||
@@ -93,6 +94,8 @@ uint32_t *arm_doirq(int irq, uint32_t *regs)
|
||||
up_schedule_sigaction(tcb);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
up_irq_save();
|
||||
}
|
||||
else
|
||||
|
||||
@@ -39,14 +39,16 @@ list(
|
||||
arm_doirq.c
|
||||
arm_initialstate.c
|
||||
arm_prefetchabort.c
|
||||
arm_schedulesigaction.c
|
||||
arm_sigdeliver.c
|
||||
arm_syscall.c
|
||||
arm_tcbinfo.c
|
||||
arm_undefinedinsn.c
|
||||
arm_perf.c
|
||||
cp15_cacheops.c)
|
||||
|
||||
if(CONFIG_ENABLE_ALL_SIGNALS)
|
||||
list(APPEND SRCS arm_schedulesigaction.c arm_sigdeliver.c)
|
||||
endif()
|
||||
|
||||
if(NOT CONFIG_ARCH_CHIP STREQUAL tms570)
|
||||
list(APPEND SRCS arm_gicv2.c arm_gicv2_dump.c)
|
||||
endif()
|
||||
|
||||
@@ -34,7 +34,6 @@ HEAD_ASRC += arm_vectortab.S
|
||||
CMN_CSRCS += arm_cache.c arm_cpuinfo.c arm_dataabort.c
|
||||
CMN_CSRCS += arm_doirq.c arm_gicv2.c arm_gicv2_dump.c
|
||||
CMN_CSRCS += arm_initialstate.c arm_prefetchabort.c
|
||||
CMN_CSRCS += arm_schedulesigaction.c arm_sigdeliver.c
|
||||
CMN_CSRCS += arm_syscall.c arm_tcbinfo.c arm_undefinedinsn.c
|
||||
CMN_CSRCS += arm_perf.c cp15_cacheops.c
|
||||
|
||||
@@ -42,6 +41,10 @@ CMN_CSRCS += arm_perf.c cp15_cacheops.c
|
||||
|
||||
CMN_ASRCS += arm_head.S arm_vectors.S arm_saveusercontext.S
|
||||
|
||||
ifeq ($(CONFIG_ENABLE_ALL_SIGNALS),y)
|
||||
CMN_CSRCS += arm_schedulesigaction.c arm_sigdeliver.c
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_ARMV7R_HAVE_PTM), y)
|
||||
CMN_CSRCS += arm_timer.c
|
||||
endif
|
||||
|
||||
@@ -353,7 +353,7 @@ uint32_t *arm_syscall(uint32_t *regs)
|
||||
break;
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_BUILD_PROTECTED
|
||||
#if defined(CONFIG_BUILD_PROTECTED) && defined(CONFIG_ENABLE_ALL_SIGNALS)
|
||||
/* R0=SYS_signal_handler: This a user signal handler callback
|
||||
*
|
||||
* void signal_handler(_sa_sigaction_t sighand, int signo,
|
||||
@@ -433,9 +433,7 @@ uint32_t *arm_syscall(uint32_t *regs)
|
||||
#endif
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_BUILD_PROTECTED
|
||||
/* R0=SYS_signal_handler_return: This a user signal handler callback
|
||||
*
|
||||
* void signal_handler_return(void);
|
||||
@@ -474,7 +472,7 @@ uint32_t *arm_syscall(uint32_t *regs)
|
||||
#endif
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
#endif /* CONFIG_BUILD_PROTECTED && CONFIG_ENABLE_ALL_SIGNALS */
|
||||
|
||||
/* This is not an architecture-specific system call. If NuttX is built
|
||||
* as a standalone kernel with a system call interface, then all of the
|
||||
|
||||
@@ -201,7 +201,7 @@ arm_vectorirq:
|
||||
/* Call arm_decodeirq() on the interrupt stack */
|
||||
|
||||
setirqstack r1, r3 /* SP = interrupt stack top */
|
||||
#else
|
||||
#elif defined(CONFIG_ENABLE_ALL_SIGNALS)
|
||||
/* Call arm_decodeirq() on the user stack */
|
||||
|
||||
/* If the interrupt stack is disabled, reserve xcpcontext to ensure
|
||||
@@ -313,7 +313,7 @@ arm_vectorsvc:
|
||||
/* Call arm_syscall() on the interrupt stack */
|
||||
|
||||
setirqstack r1, r3 /* SP = interrupt stack top */
|
||||
#else
|
||||
#elif defined(CONFIG_ENABLE_ALL_SIGNALS)
|
||||
/* Call arm_syscall() on the user stack */
|
||||
|
||||
/* If the interrupt stack is disabled, reserve xcpcontext to ensure
|
||||
|
||||
@@ -34,16 +34,18 @@ set(SRCS
|
||||
arm_memfault.c
|
||||
arm_perf.c
|
||||
arm_sau.c
|
||||
arm_schedulesigaction.c
|
||||
arm_securefault.c
|
||||
arm_secure_irq.c
|
||||
arm_sigdeliver.c
|
||||
arm_svcall.c
|
||||
arm_systemreset.c
|
||||
arm_tcbinfo.c
|
||||
arm_trigger_irq.c
|
||||
arm_usagefault.c)
|
||||
|
||||
if(CONFIG_ENABLE_ALL_SIGNALS)
|
||||
list(APPEND SRCS arm_schedulesigaction.c arm_sigdeliver.c)
|
||||
endif()
|
||||
|
||||
if(NOT CONFIG_ARCH_HAVE_CUSTOM_VECTORS)
|
||||
list(APPEND SRCS arm_vectors.c)
|
||||
endif()
|
||||
|
||||
@@ -29,11 +29,15 @@ CMN_ASRCS += arm_exception.S arm_saveusercontext.S
|
||||
CMN_CSRCS += arm_busfault.c arm_cache.c arm_cpuinfo.c arm_doirq.c
|
||||
CMN_CSRCS += arm_hardfault.c arm_initialstate.c arm_itm.c
|
||||
CMN_CSRCS += arm_memfault.c arm_perf.c arm_sau.c
|
||||
CMN_CSRCS += arm_schedulesigaction.c arm_securefault.c arm_secure_irq.c
|
||||
CMN_CSRCS += arm_sigdeliver.c arm_svcall.c
|
||||
CMN_CSRCS += arm_securefault.c arm_secure_irq.c
|
||||
CMN_CSRCS += arm_svcall.c
|
||||
CMN_CSRCS += arm_systemreset.c arm_tcbinfo.c
|
||||
CMN_CSRCS += arm_trigger_irq.c arm_usagefault.c arm_dbgmonitor.c
|
||||
|
||||
ifeq ($(CONFIG_ENABLE_ALL_SIGNALS),y)
|
||||
CMN_CSRCS += arm_schedulesigaction.c arm_sigdeliver.c
|
||||
endif
|
||||
|
||||
ifneq ($(CONFIG_ARCH_HAVE_CUSTOM_VECTORS),y)
|
||||
CMN_CSRCS += arm_vectors.c
|
||||
endif
|
||||
|
||||
@@ -98,6 +98,7 @@ uint32_t *arm_doirq(int irq, uint32_t *regs)
|
||||
|
||||
irq_dispatch(irq, regs);
|
||||
#endif
|
||||
#ifdef CONFIG_ENABLE_ALL_SIGNALS
|
||||
if (tcb->sigdeliver)
|
||||
{
|
||||
/* Pendsv able to access running tcb with no critical section */
|
||||
@@ -105,6 +106,8 @@ uint32_t *arm_doirq(int irq, uint32_t *regs)
|
||||
up_schedule_sigaction(tcb);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
up_irq_save();
|
||||
}
|
||||
else
|
||||
|
||||
@@ -205,9 +205,11 @@ exception_common:
|
||||
*/
|
||||
tst r14, #EXC_RETURN_THREAD_MODE /* Nonzero if context on thread mode */
|
||||
beq 3f /* Branch if context already on the handle mode */
|
||||
#ifdef CONFIG_ENABLE_ALL_SIGNALS
|
||||
sub r2, r1, #XCPTCONTEXT_SIZE /* Reserve signal context */
|
||||
bic r2, r2, #7 /* Get the stack pointer with 8-byte alignment */
|
||||
mov sp, r2 /* Instantiate the aligned stack */
|
||||
#endif
|
||||
3:
|
||||
#endif
|
||||
mov fp, r1
|
||||
|
||||
@@ -41,14 +41,16 @@ list(
|
||||
arm_gicv3.c
|
||||
arm_initialstate.c
|
||||
arm_prefetchabort.c
|
||||
arm_schedulesigaction.c
|
||||
arm_sigdeliver.c
|
||||
arm_syscall.c
|
||||
arm_tcbinfo.c
|
||||
arm_undefinedinsn.c
|
||||
arm_perf.c
|
||||
cp15_cacheops.c)
|
||||
|
||||
if(CONFIG_ENABLE_ALL_SIGNALS)
|
||||
list(APPEND SRCS arm_schedulesigaction.c arm_sigdeliver.c)
|
||||
endif()
|
||||
|
||||
if(CONFIG_ARCH_FPU)
|
||||
list(APPEND SRCS arm_fpucmp.c arm_fpuconfig.S)
|
||||
endif()
|
||||
|
||||
@@ -34,10 +34,13 @@ HEAD_ASRC += arm_vectortab.S
|
||||
CMN_CSRCS += arm_timer.c arm_cache.c arm_cpuinfo.c arm_dataabort.c
|
||||
CMN_CSRCS += arm_doirq.c arm_gicv3.c
|
||||
CMN_CSRCS += arm_initialstate.c arm_prefetchabort.c
|
||||
CMN_CSRCS += arm_schedulesigaction.c arm_sigdeliver.c
|
||||
CMN_CSRCS += arm_syscall.c arm_tcbinfo.c arm_undefinedinsn.c
|
||||
CMN_CSRCS += arm_perf.c cp15_cacheops.c
|
||||
|
||||
ifeq ($(CONFIG_ENABLE_ALL_SIGNALS),y)
|
||||
CMN_CSRCS += arm_schedulesigaction.c arm_sigdeliver.c
|
||||
endif
|
||||
|
||||
# Common C source files
|
||||
|
||||
CMN_ASRCS += arm_head.S arm_vectors.S arm_saveusercontext.S
|
||||
|
||||
@@ -262,7 +262,7 @@ arm_vectorirq:
|
||||
/* Call arm_decodeirq() on the interrupt stack */
|
||||
|
||||
setirqstack r1, r3 /* SP = interrupt stack top */
|
||||
#else
|
||||
#elif defined(CONFIG_ENABLE_ALL_SIGNALS)
|
||||
/* Call arm_decodeirq() on the user stack */
|
||||
|
||||
/* If the interrupt stack is disabled, reserve xcpcontext to ensure
|
||||
@@ -382,7 +382,7 @@ arm_vectorsvc:
|
||||
/* Call arm_syscall() on the interrupt stack */
|
||||
|
||||
setirqstack r1, r3 /* SP = interrupt stack top */
|
||||
#else
|
||||
#elif defined(CONFIG_ENABLE_ALL_SIGNALS)
|
||||
/* Call arm_syscall() on the user stack */
|
||||
|
||||
/* If the interrupt stack is disabled, reserve xcpcontext to ensure
|
||||
|
||||
@@ -151,7 +151,7 @@ arm_vectorirq:
|
||||
str r1, [sp, #-4]! /* Save the xcp address at SP-4 then update SP */
|
||||
bl arm_doirq /* Call the handler */
|
||||
ldr sp, [sp] /* Restore the user stack pointer */
|
||||
#else
|
||||
#elif defined(CONFIG_ENABLE_ALL_SIGNALS)
|
||||
/* If the interrupt stack is disabled, reserve xcpcontext to ensure
|
||||
* that signal processing can have a separate xcpcontext to handle
|
||||
* signal context (reference: arm_schedulesigaction.c):
|
||||
@@ -163,9 +163,11 @@ arm_vectorirq:
|
||||
*/
|
||||
|
||||
sub sp, sp, #XCPTCONTEXT_SIZE /* Reserve signal context */
|
||||
#endif
|
||||
|
||||
bl arm_doirq /* Call the handler */
|
||||
|
||||
#ifdef CONFIG_ENABLE_ALL_SIGNALS
|
||||
add sp, sp, #XCPTCONTEXT_SIZE /* Restore signal context */
|
||||
#endif
|
||||
|
||||
|
||||
@@ -52,11 +52,14 @@ if(NOT CONFIG_ARCH_IDLE_CUSTOM)
|
||||
endif()
|
||||
|
||||
if(CONFIG_BUILD_PROTECTED OR CONFIG_BUILD_KERNEL)
|
||||
list(APPEND SRCS arm_task_start.c arm_pthread_start.c arm_signal_dispatch.c)
|
||||
list(APPEND SRCS arm_task_start.c arm_pthread_start.c)
|
||||
|
||||
if(CONFIG_BUILD_PROTECTED)
|
||||
target_sources(arch_interface
|
||||
PRIVATE ${ARCH_TOOLCHAIN_PATH}/arm_signal_handler.S)
|
||||
if(CONFIG_ENABLE_ALL_SIGNALS)
|
||||
list(APPEND SRCS arm_signal_dispatch.c)
|
||||
if(CONFIG_BUILD_PROTECTED)
|
||||
target_sources(arch_interface
|
||||
PRIVATE ${ARCH_TOOLCHAIN_PATH}/arm_signal_handler.S)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
||||
@@ -40,9 +40,11 @@ endif
|
||||
|
||||
ifeq ($(CONFIG_BUILD_PROTECTED)$(CONFIG_BUILD_KERNEL),y)
|
||||
CMN_CSRCS += arm_task_start.c arm_pthread_start.c
|
||||
CMN_CSRCS += arm_signal_dispatch.c
|
||||
ifeq ($(CONFIG_BUILD_PROTECTED),y)
|
||||
CMN_UASRCS += arm_signal_handler.S
|
||||
ifeq ($(CONFIG_ENABLE_ALL_SIGNALS),y)
|
||||
CMN_CSRCS += arm_signal_dispatch.c
|
||||
ifeq ($(CONFIG_BUILD_PROTECTED),y)
|
||||
CMN_UASRCS += arm_signal_handler.S
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
|
||||
#include "arm_internal.h"
|
||||
|
||||
#if !defined(CONFIG_BUILD_FLAT) && defined(__KERNEL__)
|
||||
#ifdef __KERNEL__
|
||||
|
||||
/****************************************************************************
|
||||
* Public Functions
|
||||
@@ -75,4 +75,4 @@ void up_signal_dispatch(_sa_sigaction_t sighand, int signo,
|
||||
(uintptr_t)info, (uintptr_t)ucontext);
|
||||
}
|
||||
|
||||
#endif /* !CONFIG_BUILD_FLAT && __KERNEL__ */
|
||||
#endif /* __KERNEL__ */
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
|
||||
#include <arch/syscall.h>
|
||||
|
||||
#if defined(CONFIG_BUILD_PROTECTED) && !defined(__KERNEL__)
|
||||
#ifndef __KERNEL__
|
||||
|
||||
/****************************************************************************
|
||||
* File info
|
||||
@@ -109,4 +109,4 @@ up_signal_handler:
|
||||
.size up_signal_handler, .-up_signal_handler
|
||||
.end
|
||||
|
||||
#endif /* CONFIG_BUILD_PROTECTED && !__KERNEL__ */
|
||||
#endif /* !__KERNEL__ */
|
||||
|
||||
@@ -55,9 +55,13 @@ CMN_CSRCS += arm_sigdeliver.c
|
||||
CMN_ASRCS += tc32_fullcontextrestore.S tc32_switchcontext.S
|
||||
CMN_ASRCS += tc32_saveusercontext.S tc32_exception.S
|
||||
|
||||
CMN_CSRCS += tc32_doirq.c tc32_initialstate.c tc32_schedulesigaction.c
|
||||
CMN_CSRCS += tc32_doirq.c tc32_initialstate.c
|
||||
CMN_CSRCS += tc32_syscall.c tc32_udelay.c
|
||||
|
||||
ifeq ($(CONFIG_ENABLE_ALL_SIGNALS),y)
|
||||
CHIP_CSRCS += tc32_schedulesigaction.c
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_SCHED_BACKTRACE),y)
|
||||
CMN_CSRCS += tc32_backtrace.c
|
||||
endif
|
||||
|
||||
Reference in New Issue
Block a user