From ebf1093cff0d9f05981e65b68e1859d2296963f0 Mon Sep 17 00:00:00 2001 From: Xiang Xiao Date: Sun, 17 Apr 2022 15:58:27 +0800 Subject: [PATCH] arch/arm: Switch the context of save and restore from assembler to c Signed-off-by: Xiang Xiao --- arch/arm/src/a1x/Make.defs | 17 +-- arch/arm/src/am335x/Make.defs | 14 +- arch/arm/src/arm/arm_fullcontextrestore.S | 76 ---------- arch/arm/src/arm/arm_saveusercontext.S | 100 ------------- arch/arm/src/armv6-m/arm_fullcontextrestore.S | 79 ---------- arch/arm/src/armv6-m/arm_saveusercontext.S | 89 ----------- arch/arm/src/armv7-a/arm_fullcontextrestore.S | 76 ---------- arch/arm/src/armv7-a/arm_saveusercontext.S | 138 ------------------ .../src/armv7-m/gnu/arm_fullcontextrestore.S | 79 ---------- .../arm/src/armv7-m/gnu/arm_saveusercontext.S | 88 ----------- arch/arm/src/armv7-r/arm_fullcontextrestore.S | 74 ---------- arch/arm/src/armv7-r/arm_saveusercontext.S | 129 ---------------- arch/arm/src/armv8-m/arm_fullcontextrestore.S | 79 ---------- arch/arm/src/armv8-m/arm_saveusercontext.S | 88 ----------- arch/arm/src/c5471/Make.defs | 5 +- .../arm_fullcontextrestore.c} | 42 +----- .../arm_saveusercontext.c} | 48 +----- arch/arm/src/cxd56xx/Make.defs | 10 +- arch/arm/src/dm320/Make.defs | 8 +- arch/arm/src/efm32/Make.defs | 10 +- arch/arm/src/eoss3/Make.defs | 10 +- arch/arm/src/imx1/Make.defs | 11 +- arch/arm/src/imx6/Make.defs | 13 +- arch/arm/src/imxrt/Make.defs | 6 +- arch/arm/src/kinetis/Make.defs | 6 +- arch/arm/src/kl/Make.defs | 6 +- arch/arm/src/lc823450/Make.defs | 4 +- arch/arm/src/lpc17xx_40xx/Make.defs | 6 +- arch/arm/src/lpc214x/Make.defs | 10 +- arch/arm/src/lpc2378/Make.defs | 9 +- arch/arm/src/lpc31xx/Make.defs | 6 +- arch/arm/src/lpc43xx/Make.defs | 7 +- arch/arm/src/lpc54xx/Make.defs | 7 +- arch/arm/src/max326xx/Make.defs | 4 +- arch/arm/src/moxart/Make.defs | 6 +- arch/arm/src/nrf52/Make.defs | 6 +- arch/arm/src/nuc1xx/Make.defs | 6 +- arch/arm/src/phy62xx/Make.defs | 9 +- arch/arm/src/rp2040/Make.defs | 6 +- arch/arm/src/rtl8720c/Make.defs | 8 +- arch/arm/src/s32k1xx/s32k11x/Make.defs | 6 +- arch/arm/src/s32k1xx/s32k14x/Make.defs | 6 +- arch/arm/src/sam34/Make.defs | 7 +- arch/arm/src/sama5/Make.defs | 11 +- arch/arm/src/samd2l2/Make.defs | 6 +- arch/arm/src/samd5e5/Make.defs | 7 +- arch/arm/src/samv7/Make.defs | 7 +- arch/arm/src/stm32/Make.defs | 7 +- arch/arm/src/stm32f0l0g0/Make.defs | 6 +- arch/arm/src/stm32f7/Make.defs | 8 +- arch/arm/src/stm32h7/Make.defs | 9 +- arch/arm/src/stm32l4/Make.defs | 6 +- arch/arm/src/stm32l5/Make.defs | 8 +- arch/arm/src/stm32u5/Make.defs | 8 +- arch/arm/src/str71x/Make.defs | 7 +- arch/arm/src/tiva/Make.defs | 7 +- arch/arm/src/tms570/Make.defs | 9 +- arch/arm/src/xmc4/Make.defs | 6 +- 58 files changed, 164 insertions(+), 1362 deletions(-) delete mode 100644 arch/arm/src/arm/arm_fullcontextrestore.S delete mode 100644 arch/arm/src/arm/arm_saveusercontext.S delete mode 100644 arch/arm/src/armv6-m/arm_fullcontextrestore.S delete mode 100644 arch/arm/src/armv6-m/arm_saveusercontext.S delete mode 100644 arch/arm/src/armv7-a/arm_fullcontextrestore.S delete mode 100644 arch/arm/src/armv7-a/arm_saveusercontext.S delete mode 100644 arch/arm/src/armv7-m/gnu/arm_fullcontextrestore.S delete mode 100644 arch/arm/src/armv7-m/gnu/arm_saveusercontext.S delete mode 100644 arch/arm/src/armv7-r/arm_fullcontextrestore.S delete mode 100644 arch/arm/src/armv7-r/arm_saveusercontext.S delete mode 100644 arch/arm/src/armv8-m/arm_fullcontextrestore.S delete mode 100644 arch/arm/src/armv8-m/arm_saveusercontext.S rename arch/arm/src/{armv7-m/iar/arm_fullcontextrestore.S => common/arm_fullcontextrestore.c} (62%) rename arch/arm/src/{armv7-m/iar/arm_saveusercontext.S => common/arm_saveusercontext.c} (58%) diff --git a/arch/arm/src/a1x/Make.defs b/arch/arm/src/a1x/Make.defs index 2950115d95..d859209f7a 100644 --- a/arch/arm/src/a1x/Make.defs +++ b/arch/arm/src/a1x/Make.defs @@ -41,9 +41,8 @@ endif # Common assembly language files -CMN_ASRCS += arm_vectors.S arm_fpuconfig.S arm_fullcontextrestore.S -CMN_ASRCS += arm_saveusercontext.S arm_vectoraddrexcptn.S -CMN_ASRCS += arm_testset.S arm_fetchadd.S vfork.S +CMN_ASRCS += arm_vectors.S arm_vectoraddrexcptn.S vfork.S +CMN_ASRCS += arm_fpuconfig.S arm_testset.S arm_fetchadd.S CMN_ASRCS += cp15_coherent_dcache.S cp15_invalidate_dcache.S CMN_ASRCS += cp15_clean_dcache.S cp15_flush_dcache.S cp15_invalidate_dcache_all.S CMN_ASRCS += cp15_clean_dcache_all.S cp15_flush_dcache_all.S cp15_cache_size.S @@ -53,14 +52,12 @@ CMN_ASRCS += cp15_clean_dcache_all.S cp15_flush_dcache_all.S cp15_cache_size.S CMN_CSRCS = arm_initialize.c arm_interruptcontext.c arm_exit.c arm_createstack.c CMN_CSRCS += arm_releasestack.c arm_usestack.c arm_vfork.c arm_puts.c arm_mdelay.c CMN_CSRCS += arm_stackframe.c arm_udelay.c arm_modifyreg8.c arm_modifyreg16.c -CMN_CSRCS += arm_modifyreg32.c - -CMN_CSRCS += arm_assert.c arm_blocktask.c arm_dataabort.c +CMN_CSRCS += arm_modifyreg32.c arm_assert.c arm_blocktask.c arm_dataabort.c CMN_CSRCS += arm_doirq.c arm_initialstate.c arm_mmu.c arm_prefetchabort.c -CMN_CSRCS += arm_releasepending.c arm_reprioritizertr.c -CMN_CSRCS += arm_schedulesigaction.c arm_sigdeliver.c arm_syscall.c -CMN_CSRCS += arm_unblocktask.c arm_undefinedinsn.c arm_tcbinfo.c -CMN_CSRCS += arm_switchcontext.c arm_cache.c +CMN_CSRCS += arm_releasepending.c arm_reprioritizertr.c arm_schedulesigaction.c +CMN_CSRCS += arm_sigdeliver.c arm_syscall.c arm_unblocktask.c arm_undefinedinsn.c +CMN_CSRCS += arm_switchcontext.c arm_saveusercontext.c arm_fullcontextrestore.c +CMN_CSRCS += arm_cache.c arm_tcbinfo.c # Use common heap allocation for now (may need to be customized later) diff --git a/arch/arm/src/am335x/Make.defs b/arch/arm/src/am335x/Make.defs index f565aaccca..7b27741a43 100644 --- a/arch/arm/src/am335x/Make.defs +++ b/arch/arm/src/am335x/Make.defs @@ -41,9 +41,8 @@ endif # Common assembly language files -CMN_ASRCS += arm_vectors.S arm_fpuconfig.S arm_fullcontextrestore.S -CMN_ASRCS += arm_saveusercontext.S arm_vectoraddrexcptn.S -CMN_ASRCS += arm_testset.S vfork.S +CMN_ASRCS += arm_vectors.S arm_vectoraddrexcptn.S +CMN_ASRCS += arm_fpuconfig.S arm_testset.S vfork.S CMN_ASRCS += cp15_coherent_dcache.S cp15_invalidate_dcache.S CMN_ASRCS += cp15_clean_dcache.S cp15_flush_dcache.S cp15_invalidate_dcache_all.S CMN_ASRCS += cp15_clean_dcache_all.S cp15_flush_dcache_all.S cp15_cache_size.S @@ -54,13 +53,12 @@ CMN_CSRCS = arm_initialize.c arm_idle.c arm_interruptcontext.c arm_exit.c CMN_CSRCS += arm_createstack.c arm_releasestack.c arm_usestack.c arm_vfork.c CMN_CSRCS += arm_puts.c arm_mdelay.c arm_stackframe.c arm_udelay.c CMN_CSRCS += arm_modifyreg8.c arm_modifyreg16.c arm_modifyreg32.c - CMN_CSRCS += arm_assert.c arm_blocktask.c arm_dataabort.c CMN_CSRCS += arm_doirq.c arm_initialstate.c arm_mmu.c arm_prefetchabort.c -CMN_CSRCS += arm_releasepending.c arm_reprioritizertr.c -CMN_CSRCS += arm_schedulesigaction.c arm_sigdeliver.c arm_syscall.c -CMN_CSRCS += arm_unblocktask.c arm_undefinedinsn.c arm_tcbinfo.c -CMN_CSRCS += arm_switchcontext.c arm_cache.c +CMN_CSRCS += arm_releasepending.c arm_reprioritizertr.c arm_schedulesigaction.c +CMN_CSRCS += arm_sigdeliver.c arm_syscall.c arm_unblocktask.c arm_undefinedinsn.c +CMN_CSRCS += arm_switchcontext.c arm_saveusercontext.c arm_fullcontextrestore.c +CMN_CSRCS += arm_cache.c arm_tcbinfo.c # Use common heap allocation for now (may need to be customized later) diff --git a/arch/arm/src/arm/arm_fullcontextrestore.S b/arch/arm/src/arm/arm_fullcontextrestore.S deleted file mode 100644 index 736829278b..0000000000 --- a/arch/arm/src/arm/arm_fullcontextrestore.S +++ /dev/null @@ -1,76 +0,0 @@ -/**************************************************************************** - * arch/arm/src/arm/arm_fullcontextrestore.S - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include -#include -#include - -#include "arm.h" - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/**************************************************************************** - * Public Symbols - ****************************************************************************/ - - .file "arm_fullcontextrestore.S" - -/**************************************************************************** - * Macros - ****************************************************************************/ - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: arm_fullcontextrestore - * - * Description: - * Restore the current thread context. Full prototype is: - * - * void arm_fullcontextrestore(uint32_t *restoreregs) noreturn_function; - * - * Returned Value: - * None - * - ****************************************************************************/ - - .globl arm_fullcontextrestore - .type arm_fullcontextrestore, function -arm_fullcontextrestore: - - /* Perform the System call with R0=1 and R1=regs */ - - mov r1, r0 /* R1: regs */ - mov r0, #SYS_restore_context /* R0: restore context */ - svc #SYS_syscall /* Force synchronous SVCall (or Hard Fault) */ - - /* This call should not return */ - - bx lr /* Unnecessary ... will not return */ - .size arm_fullcontextrestore, .-arm_fullcontextrestore - .end diff --git a/arch/arm/src/arm/arm_saveusercontext.S b/arch/arm/src/arm/arm_saveusercontext.S deleted file mode 100644 index c50cf7d439..0000000000 --- a/arch/arm/src/arm/arm_saveusercontext.S +++ /dev/null @@ -1,100 +0,0 @@ -/**************************************************************************** - * arch/arm/src/arm/arm_saveusercontext.S - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include -#include - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/**************************************************************************** - * Public Symbols - ****************************************************************************/ - - .file "arm_saveusercontext.S" - -/**************************************************************************** - * Macros - ****************************************************************************/ - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: up_saveusercontext - * - * Description: - * Save the current thread context. Full prototype is: - * - * int up_saveusercontext(void *saveregs); - * - * Returned Value: - * 0: Normal return - * 1: Context switch return - * - ****************************************************************************/ - - .globl up_saveusercontext - .type up_saveusercontext, function -up_saveusercontext: - - /* On entry, a1 (r0) holds address of struct xcptcontext */ - - /* Make sure that the return value will be non-zero (the value of the - * other volatile registers don't matter -- r1-r3, ip). This function - * is called through the normal C calling conventions and the values of - * these registers cannot be assumed at the point of setjmp return. - */ - - mov ip, #1 - str ip, [r0, #(4*REG_R0)] - - /* Save the volatile registers (plus r12 which really - * doesn't need to be saved) - */ - - add r1, r0, #(4*REG_R4) - stmia r1, {r4-r14} - - /* Save the current cpsr */ - - mrs r2, cpsr /* R2 = CPSR value */ - add r1, r0, #(4*REG_CPSR) - str r2, [r1] - - /* Save the return address as the PC so that we return to the exit from - * this function. - */ - - add r1, r0, #(4*REG_PC) - str lr, [r1] - - /* Return 0 now indicating that this return is not a context switch */ - - mov r0, #0 /* Return value == 0 */ - bx lr /* Return */ - .size up_saveusercontext, .-up_saveusercontext - .end diff --git a/arch/arm/src/armv6-m/arm_fullcontextrestore.S b/arch/arm/src/armv6-m/arm_fullcontextrestore.S deleted file mode 100644 index 5f27ea3907..0000000000 --- a/arch/arm/src/armv6-m/arm_fullcontextrestore.S +++ /dev/null @@ -1,79 +0,0 @@ -/**************************************************************************** - * arch/arm/src/armv6-m/arm_fullcontextrestore.S - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include -#include -#include - -#include "nvic.h" - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/**************************************************************************** - * Public Symbols - ****************************************************************************/ - - .file "arm_fullcontextrestore.S" - -/**************************************************************************** - * Macros - ****************************************************************************/ - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: arm_fullcontextrestore - * - * Description: - * Restore the current thread context. Full prototype is: - * - * void arm_fullcontextrestore(uint32_t *restoreregs) noreturn_function; - * - * Returned Value: - * None - * - ****************************************************************************/ - - .align 2 - .code 16 - .thumb_func - .globl arm_fullcontextrestore - .type arm_fullcontextrestore, function -arm_fullcontextrestore: - - /* Perform the System call with R0=1 and R1=regs */ - - mov r1, r0 /* R1: regs */ - mov r0, #SYS_restore_context /* R0: restore context */ - svc #SYS_syscall /* Force synchronous SVCall (or Hard Fault) */ - - /* This call should not return */ - - bx lr /* Unnecessary ... will not return */ - .size arm_fullcontextrestore, .-arm_fullcontextrestore - .end diff --git a/arch/arm/src/armv6-m/arm_saveusercontext.S b/arch/arm/src/armv6-m/arm_saveusercontext.S deleted file mode 100644 index f1dbcb067b..0000000000 --- a/arch/arm/src/armv6-m/arm_saveusercontext.S +++ /dev/null @@ -1,89 +0,0 @@ -/**************************************************************************** - * arch/arm/src/armv6-m/arm_saveusercontext.S - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include -#include -#include - -#include "nvic.h" - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/**************************************************************************** - * Public Symbols - ****************************************************************************/ - - .file "arm_saveusercontext.S" - -/**************************************************************************** - * Macros - ****************************************************************************/ - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: up_saveusercontext - * - * Description: - * Save the current thread context. Full prototype is: - * - * int up_saveusercontext(void *saveregs); - * - * Returned Value: - * 0: Normal return - * 1: Context switch return - * - ****************************************************************************/ - - .text - .align 2 - .code 16 - .thumb_func - .globl up_saveusercontext - .type up_saveusercontext, function -up_saveusercontext: - - /* Perform the System call with R0=0 and R1=regs */ - - mov r1, r0 /* R1: regs */ - mov r0, #SYS_save_context /* R0: save context (also return value) */ - svc #SYS_syscall /* Force synchronous SVCall (or Hard Fault) */ - - /* There are two return conditions. On the first return, R0 (the - * return value will be zero. On the second return we need to - * force R0 to be 1. - */ - - mov r3, #(4*REG_R0) /* R3=Offset to R0 storage */ - add r2, r1, r3 /* R2=Address of R0 storage */ - mov r3, #1 /* R3=Return value of one */ - str r3, [r2, #0] /* Save return value */ - bx lr /* "normal" return with r0=0 or - * context switch with r0=1 */ - .size up_saveusercontext, .-up_saveusercontext - .end diff --git a/arch/arm/src/armv7-a/arm_fullcontextrestore.S b/arch/arm/src/armv7-a/arm_fullcontextrestore.S deleted file mode 100644 index ce0632100f..0000000000 --- a/arch/arm/src/armv7-a/arm_fullcontextrestore.S +++ /dev/null @@ -1,76 +0,0 @@ -/**************************************************************************** - * arch/arm/src/armv7-a/arm_fullcontextrestore.S - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include -#include -#include - -#include "arm.h" - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/**************************************************************************** - * Public Symbols - ****************************************************************************/ - - .file "arm_fullcontextrestore.S" - -/**************************************************************************** - * Macros - ****************************************************************************/ - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: arm_fullcontextrestore - * - * Description: - * Restore the current thread context. Full prototype is: - * - * void arm_fullcontextrestore(uint32_t *restoreregs) noreturn_function; - * - * Returned Value: - * None - * - ****************************************************************************/ - - .globl arm_fullcontextrestore - .type arm_fullcontextrestore, function -arm_fullcontextrestore: - - /* Perform the System call with R0=1 and R1=regs */ - - mov r1, r0 /* R1: regs */ - mov r0, #SYS_restore_context /* R0: restore context */ - svc #SYS_syscall /* Force synchronous SVCall (or Hard Fault) */ - - /* This call should not return */ - - bx lr /* Unnecessary ... will not return */ - .size arm_fullcontextrestore, .-arm_fullcontextrestore - .end diff --git a/arch/arm/src/armv7-a/arm_saveusercontext.S b/arch/arm/src/armv7-a/arm_saveusercontext.S deleted file mode 100644 index 71d42cb07e..0000000000 --- a/arch/arm/src/armv7-a/arm_saveusercontext.S +++ /dev/null @@ -1,138 +0,0 @@ -/**************************************************************************** - * arch/arm/src/armv7-a/arm_saveusercontext.S - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include -#include - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/**************************************************************************** - * Public Symbols - ****************************************************************************/ - - .file "arm_saveusercontext.S" - -/**************************************************************************** - * Macros - ****************************************************************************/ - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: up_saveusercontext - * - * Description: - * Save the current thread context. Full prototype is: - * - * int up_saveusercontext(void *saveregs); - * - * Returned Value: - * 0: Normal return - * 1: Context switch return - * - ****************************************************************************/ - - .globl up_saveusercontext - .type up_saveusercontext, function -up_saveusercontext: - - /* On entry, a1 (r0) holds address of struct xcptcontext */ - - /* Make sure that the return value will be non-zero (the value of the - * other volatile registers don't matter -- r1-r3, ip). This function - * is called through the normal C calling conventions and the values of - * these registers cannot be assumed at the point of setjmp return. - */ - - mov ip, #1 - str ip, [r0, #(4*REG_R0)] - - /* Save the volatile registers (plus r12 which really - * doesn't need to be saved) - */ - - add r1, r0, #(4*REG_R4) - stmia r1, {r4-r14} - - /* Save the current cpsr */ - - mrs r2, cpsr /* R2 = CPSR value */ - add r1, r0, #(4*REG_CPSR) - str r2, [r1] - - /* Save the return address as the PC so that we return to the exit from - * this function. - */ - - ldr r2, =1f - add r1, r0, #(4*REG_PC) - str r2, [r1] - - /* Save the floating point registers. - * REVISIT: Not all of the floating point registers need to be saved. - * Some are volatile and need not be preserved across functions calls. - * But right now, I can't find the definitive list of the volatile - * floating point registers. - */ - -#ifdef CONFIG_ARCH_FPU - add r1, r0, #(4*REG_S0) /* R1=Address of FP register storage */ - - /* Store all floating point registers. Registers are stored in numeric order, - * s0, s1, ... in increasing address order. - */ - -#ifdef CONFIG_ARM_DPFPU32 - vstmia.64 r1!, {d0-d15} /* Save the full FP context */ - vstmia.64 r1!, {d16-d31} -#else - vstmia r1!, {s0-s31} /* Save the full FP context */ -#endif - - /* Store the floating point control and status register. At the end of the - * vstmia, r1 will point to the FPSCR storage location. - */ - - vmrs r2, fpscr /* Fetch the FPSCR */ - str r2, [r1], #4 /* Save the floating point control and status register */ -#endif - - /* Return 0 now indicating that this return is not a context switch */ - - mov r0, #0 /* Return value == 0 */ - bx lr /* Return */ - -1: - - /* Return 1 now indicating that this return is a context switch */ - - mov r0, #1 /* Return value == 1 */ - bx lr /* Return */ - - .size up_saveusercontext, .-up_saveusercontext - .end diff --git a/arch/arm/src/armv7-m/gnu/arm_fullcontextrestore.S b/arch/arm/src/armv7-m/gnu/arm_fullcontextrestore.S deleted file mode 100644 index 54351f2063..0000000000 --- a/arch/arm/src/armv7-m/gnu/arm_fullcontextrestore.S +++ /dev/null @@ -1,79 +0,0 @@ -/**************************************************************************** - * arch/arm/src/armv7-m/gnu/arm_fullcontextrestore.S - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include -#include -#include - -#include "nvic.h" - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/**************************************************************************** - * Public Symbols - ****************************************************************************/ - - .syntax unified - .thumb - .file "arm_fullcontextrestore.S" - -/**************************************************************************** - * Macros - ****************************************************************************/ - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: arm_fullcontextrestore - * - * Description: - * Restore the current thread context. Full prototype is: - * - * void arm_fullcontextrestore(uint32_t *restoreregs) noreturn_function; - * - * Returned Value: - * None - * - ****************************************************************************/ - - .thumb_func - .globl arm_fullcontextrestore - .type arm_fullcontextrestore, function -arm_fullcontextrestore: - - /* Perform the System call with R0=1 and R1=regs */ - - mov r1, r0 /* R1: regs */ - mov r0, #SYS_restore_context /* R0: restore context */ - svc #SYS_syscall /* Force synchronous SVCall (or Hard Fault) */ - - /* This call should not return */ - - bx lr /* Unnecessary ... will not return */ - .size arm_fullcontextrestore, .-arm_fullcontextrestore - .end diff --git a/arch/arm/src/armv7-m/gnu/arm_saveusercontext.S b/arch/arm/src/armv7-m/gnu/arm_saveusercontext.S deleted file mode 100644 index 7fabb33838..0000000000 --- a/arch/arm/src/armv7-m/gnu/arm_saveusercontext.S +++ /dev/null @@ -1,88 +0,0 @@ -/**************************************************************************** - * arch/arm/src/armv7-m/gnu/arm_saveusercontext.S - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include -#include -#include - -#include "nvic.h" - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/**************************************************************************** - * Public Symbols - ****************************************************************************/ - - .syntax unified - .thumb - .file "arm_saveusercontext.S" - -/**************************************************************************** - * Macros - ****************************************************************************/ - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: up_saveusercontext - * - * Description: - * Save the current thread context. Full prototype is: - * - * int up_saveusercontext(void *saveregs); - * - * Returned Value: - * 0: Normal return - * 1: Context switch return - * - ****************************************************************************/ - - .text - .thumb_func - .globl up_saveusercontext - .type up_saveusercontext, function -up_saveusercontext: - - /* Perform the System call with R0=0 and R1=regs */ - - mov r1, r0 /* R1: regs */ - mov r0, #SYS_save_context /* R0: save context (also return value) */ - svc #SYS_syscall /* Force synchronous SVCall (or Hard Fault) */ - - /* There are two return conditions. On the first return, R0 (the - * return value will be zero. On the second return we need to - * force R0 to be 1. - */ - - add r2, r1, #(4*REG_R0) - mov r3, #1 - str r3, [r2, #0] - bx lr /* "normal" return with r0=0 or - * context switch with r0=1 */ - .size up_saveusercontext, .-up_saveusercontext - .end diff --git a/arch/arm/src/armv7-r/arm_fullcontextrestore.S b/arch/arm/src/armv7-r/arm_fullcontextrestore.S deleted file mode 100644 index 16ccc60d4c..0000000000 --- a/arch/arm/src/armv7-r/arm_fullcontextrestore.S +++ /dev/null @@ -1,74 +0,0 @@ -/**************************************************************************** - * arch/arm/src/armv7-r/arm_fullcontextrestore.S - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include -#include -#include - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/**************************************************************************** - * Public Symbols - ****************************************************************************/ - - .file "arm_fullcontextrestore.S" - -/**************************************************************************** - * Macros - ****************************************************************************/ - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: arm_fullcontextrestore - * - * Description: - * Restore the current thread context. Full prototype is: - * - * void arm_fullcontextrestore(uint32_t *restoreregs) noreturn_function; - * - * Returned Value: - * None - * - ****************************************************************************/ - - .globl arm_fullcontextrestore - .type arm_fullcontextrestore, function -arm_fullcontextrestore: - - /* Perform the System call with R0=1 and R1=regs */ - - mov r1, r0 /* R1: regs */ - mov r0, #SYS_restore_context /* R0: restore context */ - svc #SYS_syscall /* Force synchronous SVCall (or Hard Fault) */ - - /* This call should not return */ - - bx lr /* Unnecessary ... will not return */ - .size arm_fullcontextrestore, .-arm_fullcontextrestore - .end diff --git a/arch/arm/src/armv7-r/arm_saveusercontext.S b/arch/arm/src/armv7-r/arm_saveusercontext.S deleted file mode 100644 index edbebfc75e..0000000000 --- a/arch/arm/src/armv7-r/arm_saveusercontext.S +++ /dev/null @@ -1,129 +0,0 @@ -/**************************************************************************** - * arch/arm/src/armv7-r/arm_saveusercontext.S - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include -#include - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/**************************************************************************** - * Public Symbols - ****************************************************************************/ - - .file "arm_saveusercontext.S" - -/**************************************************************************** - * Macros - ****************************************************************************/ - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: up_saveusercontext - * - * Description: - * Save the current thread context. Full prototype is: - * - * int up_saveusercontext(void *saveregs); - * - * Returned Value: - * 0: Normal return - * 1: Context switch return - * - ****************************************************************************/ - - .globl up_saveusercontext - .type up_saveusercontext, function -up_saveusercontext: - - /* On entry, a1 (r0) holds address of struct xcptcontext */ - - /* Make sure that the return value will be non-zero (the value of the - * other volatile registers don't matter -- r1-r3, ip). This function - * is called through the normal C calling conventions and the values of - * these registers cannot be assumed at the point of setjmp return. - */ - - mov ip, #1 - str ip, [r0, #(4*REG_R0)] - - /* Save the volatile registers (plus r12 which really - * doesn't need to be saved) - */ - - add r1, r0, #(4*REG_R4) - stmia r1, {r4-r14} - - /* Save the current cpsr */ - - mrs r2, cpsr /* R2 = CPSR value */ - add r1, r0, #(4*REG_CPSR) - str r2, [r1] - - /* Save the return address as the PC so that we return to the exit from - * this function. - */ - - add r1, r0, #(4*REG_PC) - str lr, [r1] - - /* Save the floating point registers. - * REVISIT: Not all of the floating point registers need to be saved. - * Some are volatile and need not be preserved across functions calls. - * But right now, I can't find the definitive list of the volatile - * floating point registers. - */ - -#ifdef CONFIG_ARCH_FPU - add r1, r0, #(4*REG_S0) /* R1=Address of FP register storage */ - - /* Store all floating point registers. Registers are stored in numeric order, - * s0, s1, ... in increasing address order. - */ - -#ifdef CONFIG_ARM_DPFPU32 - vstmia.64 r1!, {d0-d15} /* Save the full FP context */ - vstmia.64 r1!, {d16-d31} -#else - vstmia r1!, {s0-s31} /* Save the full FP context */ -#endif - - /* Store the floating point control and status register. At the end of the - * vstmia, r1 will point to the FPSCR storage location. - */ - - vmrs r2, fpscr /* Fetch the FPSCR */ - str r2, [r1], #4 /* Save the floating point control and status register */ -#endif - - /* Return 0 now indicating that this return is not a context switch */ - - mov r0, #0 /* Return value == 0 */ - bx lr /* Return */ - .size up_saveusercontext, .-up_saveusercontext - .end diff --git a/arch/arm/src/armv8-m/arm_fullcontextrestore.S b/arch/arm/src/armv8-m/arm_fullcontextrestore.S deleted file mode 100644 index 0227bd21f6..0000000000 --- a/arch/arm/src/armv8-m/arm_fullcontextrestore.S +++ /dev/null @@ -1,79 +0,0 @@ -/**************************************************************************** - * arch/arm/src/armv8-m/arm_fullcontextrestore.S - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include -#include -#include - -#include "nvic.h" - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/**************************************************************************** - * Public Symbols - ****************************************************************************/ - - .syntax unified - .thumb - .file "arm_fullcontextrestore.S" - -/**************************************************************************** - * Macros - ****************************************************************************/ - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: arm_fullcontextrestore - * - * Description: - * Restore the current thread context. Full prototype is: - * - * void arm_fullcontextrestore(uint32_t *restoreregs) noreturn_function; - * - * Returned Value: - * None - * - ****************************************************************************/ - - .thumb_func - .globl arm_fullcontextrestore - .type arm_fullcontextrestore, function -arm_fullcontextrestore: - - /* Perform the System call with R0=1 and R1=regs */ - - mov r1, r0 /* R1: regs */ - mov r0, #SYS_restore_context /* R0: restore context */ - svc #SYS_syscall /* Force synchronous SVCall (or Hard Fault) */ - - /* This call should not return */ - - bx lr /* Unnecessary ... will not return */ - .size arm_fullcontextrestore, .-arm_fullcontextrestore - .end diff --git a/arch/arm/src/armv8-m/arm_saveusercontext.S b/arch/arm/src/armv8-m/arm_saveusercontext.S deleted file mode 100644 index 604b4a4a74..0000000000 --- a/arch/arm/src/armv8-m/arm_saveusercontext.S +++ /dev/null @@ -1,88 +0,0 @@ -/**************************************************************************** - * arch/arm/src/armv8-m/arm_saveusercontext.S - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include -#include -#include - -#include "nvic.h" - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/**************************************************************************** - * Public Symbols - ****************************************************************************/ - - .syntax unified - .thumb - .file "arm_saveusercontext.S" - -/**************************************************************************** - * Macros - ****************************************************************************/ - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: up_saveusercontext - * - * Description: - * Save the current thread context. Full prototype is: - * - * int up_saveusercontext(void *saveregs); - * - * Returned Value: - * 0: Normal return - * 1: Context switch return - * - ****************************************************************************/ - - .text - .thumb_func - .globl up_saveusercontext - .type up_saveusercontext, function -up_saveusercontext: - - /* Perform the System call with R0=0 and R1=regs */ - - mov r1, r0 /* R1: regs */ - mov r0, #SYS_save_context /* R0: save context (also return value) */ - svc #SYS_syscall /* Force synchronous SVCall (or Hard Fault) */ - - /* There are two return conditions. On the first return, R0 (the - * return value will be zero. On the second return we need to - * force R0 to be 1. - */ - - add r2, r1, #(4*REG_R0) - mov r3, #1 - str r3, [r2, #0] - bx lr /* "normal" return with r0=0 or - * context switch with r0=1 */ - .size up_saveusercontext, .-up_saveusercontext - .end diff --git a/arch/arm/src/c5471/Make.defs b/arch/arm/src/c5471/Make.defs index affa2f5936..f6ca0f753c 100644 --- a/arch/arm/src/c5471/Make.defs +++ b/arch/arm/src/c5471/Make.defs @@ -19,8 +19,7 @@ ############################################################################ HEAD_ASRC = arm_nommuhead.S - -CMN_ASRCS = arm_saveusercontext.S arm_fullcontextrestore.S vfork.S +CMN_ASRCS = vfork.S CMN_CSRCS = arm_allocateheap.c arm_assert.c arm_blocktask.c CMN_CSRCS += arm_createstack.c arm_dataabort.c arm_mdelay.c arm_udelay.c arm_doirq.c @@ -28,8 +27,8 @@ CMN_CSRCS += arm_exit.c arm_initialize.c arm_initialstate.c arm_interruptcontext CMN_CSRCS += arm_prefetchabort.c arm_releasepending.c arm_releasestack.c CMN_CSRCS += arm_reprioritizertr.c arm_schedulesigaction.c arm_sigdeliver.c CMN_CSRCS += arm_stackframe.c arm_syscall.c arm_unblocktask.c arm_undefinedinsn.c +CMN_CSRCS += arm_switchcontext.c arm_saveusercontext.c arm_fullcontextrestore.c CMN_CSRCS += arm_usestack.c arm_vfork.c arm_puts.c arm_tcbinfo.c -CMN_CSRCS += arm_switchcontext.c ifneq ($(CONFIG_ARCH_IDLE_CUSTOM),y) CMN_CSRCS += arm_idle.c diff --git a/arch/arm/src/armv7-m/iar/arm_fullcontextrestore.S b/arch/arm/src/common/arm_fullcontextrestore.c similarity index 62% rename from arch/arm/src/armv7-m/iar/arm_fullcontextrestore.S rename to arch/arm/src/common/arm_fullcontextrestore.c index 7f0ad6502d..4ed95305b9 100644 --- a/arch/arm/src/armv7-m/iar/arm_fullcontextrestore.S +++ b/arch/arm/src/common/arm_fullcontextrestore.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/arm/src/armv7-m/iar/arm_fullcontextrestore.S + * arch/arm/src/common/arm_fullcontextrestore.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -23,28 +23,9 @@ ****************************************************************************/ #include -#include + #include -#include "nvic.h" - - MODULE arm_fullcontextrestore - SECTION .text:CODE:NOROOT(2) - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/**************************************************************************** - * Public Symbols - ****************************************************************************/ - - PUBLIC arm_fullcontextrestore - -/**************************************************************************** - * Macros - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ @@ -62,18 +43,7 @@ * ****************************************************************************/ - THUMB - -arm_fullcontextrestore: - - /* Perform the System call with R0=1 and R1=regs */ - - mov r1, r0 /* R1: regs */ - mov r0, #SYS_restore_context /* R0: restore context */ - svc #SYS_syscall /* Force synchronous SVCall (or Hard Fault) */ - - /* This call should not return */ - - bx lr /* Unnecessary ... will not return */ - - END +void arm_fullcontextrestore(uint32_t *restoreregs) +{ + sys_call1(SYS_restore_context, (uintptr_t)restoreregs); +} diff --git a/arch/arm/src/armv7-m/iar/arm_saveusercontext.S b/arch/arm/src/common/arm_saveusercontext.c similarity index 58% rename from arch/arm/src/armv7-m/iar/arm_saveusercontext.S rename to arch/arm/src/common/arm_saveusercontext.c index b864da4eff..87359c2c96 100644 --- a/arch/arm/src/armv7-m/iar/arm_saveusercontext.S +++ b/arch/arm/src/common/arm_saveusercontext.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/arm/src/armv7-m/iar/arm_saveusercontext.S + * arch/arm/src/common/arm_saveusercontext.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -23,28 +23,9 @@ ****************************************************************************/ #include -#include + #include -#include "nvic.h" - - MODULE up_saveusercontext - SECTION .text:CODE:NOROOT(2) - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/**************************************************************************** - * Public Symbols - ****************************************************************************/ - - PUBLIC up_saveusercontext - -/**************************************************************************** - * Macros - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ @@ -63,24 +44,7 @@ * ****************************************************************************/ - THUMB - -up_saveusercontext: - - /* Perform the System call with R0=0 and R1=regs */ - - mov r1, r0 /* R1: regs */ - mov r0, #SYS_save_context /* R0: save context (also return value) */ - svc #SYS_syscall /* Force synchronous SVCall (or Hard Fault) */ - - /* There are two return conditions. On the first return, R0 (the - * return value will be zero. On the second return we need to - * force R0 to be 1. - */ - - add r2, r1, #(4*REG_R0) - mov r3, #1 - str r3, [r2, #0] - bx lr /* "normal" return with r0=0 or - * context switch with r0=1 */ - END +int up_saveusercontext(void *saveregs) +{ + return sys_call1(SYS_save_context, (uintptr_t)saveregs); +} diff --git a/arch/arm/src/cxd56xx/Make.defs b/arch/arm/src/cxd56xx/Make.defs index 4ae0bfb939..256add911c 100644 --- a/arch/arm/src/cxd56xx/Make.defs +++ b/arch/arm/src/cxd56xx/Make.defs @@ -18,22 +18,20 @@ # ############################################################################ -CMN_ASRCS = arm_saveusercontext.S arm_fullcontextrestore.S -CMN_ASRCS += vfork.S arm_exception.S +CMN_ASRCS = vfork.S arm_exception.S ifneq ($(CONFIG_CXD56_TESTSET),y) CMN_ASRCS += arm_testset.S endif -CMN_CSRCS = arm_assert.c arm_blocktask.c -CMN_CSRCS += arm_createstack.c arm_exit.c +CMN_CSRCS = arm_assert.c arm_blocktask.c arm_createstack.c arm_exit.c CMN_CSRCS += arm_initialize.c arm_initialstate.c arm_interruptcontext.c CMN_CSRCS += arm_memfault.c arm_modifyreg8.c arm_modifyreg16.c arm_modifyreg32.c CMN_CSRCS += arm_releasepending.c arm_releasestack.c arm_reprioritizertr.c CMN_CSRCS += arm_schedulesigaction.c arm_sigdeliver.c arm_stackframe.c CMN_CSRCS += arm_unblocktask.c arm_usestack.c arm_doirq.c arm_hardfault.c -CMN_CSRCS += arm_svcall.c arm_vfork.c arm_switchcontext.c arm_puts.c -CMN_CSRCS += arm_tcbinfo.c arm_vectors.c +CMN_CSRCS += arm_svcall.c arm_vfork.c arm_switchcontext.c arm_saveusercontext.c +CMN_CSRCS += arm_fullcontextrestore.c arm_puts.c arm_tcbinfo.c arm_vectors.c ifeq ($(CONFIG_ARCH_RAMVECTORS),y) CMN_CSRCS += arm_ramvec_initialize.c arm_ramvec_attach.c diff --git a/arch/arm/src/dm320/Make.defs b/arch/arm/src/dm320/Make.defs index 186980c2c0..7a5acedadc 100644 --- a/arch/arm/src/dm320/Make.defs +++ b/arch/arm/src/dm320/Make.defs @@ -20,8 +20,8 @@ HEAD_ASRC = arm_head.S -CMN_ASRCS = arm_cache.S arm_fullcontextrestore.S arm_saveusercontext.S -CMN_ASRCS += arm_vectors.S arm_vectoraddrexcptn.S arm_vectortab.S vfork.S +CMN_ASRCS = arm_cache.S arm_vectors.S +CMN_ASRCS += arm_vectoraddrexcptn.S arm_vectortab.S vfork.S CMN_CSRCS = arm_assert.c arm_blocktask.c arm_createstack.c CMN_CSRCS += arm_dataabort.c arm_mdelay.c arm_udelay.c arm_exit.c @@ -29,8 +29,8 @@ CMN_CSRCS += arm_initialize.c arm_initialstate.c arm_interruptcontext.c CMN_CSRCS += arm_prefetchabort.c arm_releasepending.c arm_releasestack.c CMN_CSRCS += arm_reprioritizertr.c arm_schedulesigaction.c CMN_CSRCS += arm_sigdeliver.c arm_stackframe.c arm_syscall.c arm_unblocktask.c -CMN_CSRCS += arm_undefinedinsn.c arm_usestack.c arm_vfork.c arm_puts.c -CMN_CSRCS += arm_tcbinfo.c arm_switchcontext.c +CMN_CSRCS += arm_undefinedinsn.c arm_usestack.c arm_vfork.c arm_switchcontext.c +CMN_CSRCS += arm_saveusercontext.c arm_fullcontextrestore.c arm_puts.c arm_tcbinfo.c ifneq ($(CONFIG_ARCH_IDLE_CUSTOM),y) CMN_CSRCS += arm_idle.c diff --git a/arch/arm/src/efm32/Make.defs b/arch/arm/src/efm32/Make.defs index aa98ca4bfd..b2ce68b8b3 100644 --- a/arch/arm/src/efm32/Make.defs +++ b/arch/arm/src/efm32/Make.defs @@ -18,18 +18,18 @@ # ############################################################################ -CMN_ASRCS = arm_saveusercontext.S arm_fullcontextrestore.S -CMN_ASRCS += arm_testset.S arm_fetchadd.S vfork.S arm_exception.S +CMN_ASRCS = arm_testset.S arm_fetchadd.S vfork.S arm_exception.S -CMN_CSRCS = arm_allocateheap.c arm_assert.c arm_blocktask.c +CMN_CSRCS = arm_vectors.c arm_allocateheap.c arm_assert.c arm_blocktask.c CMN_CSRCS += arm_createstack.c arm_doirq.c arm_exit.c arm_hardfault.c CMN_CSRCS += arm_initialize.c arm_initialstate.c arm_interruptcontext.c CMN_CSRCS += arm_itm.c arm_mdelay.c arm_memfault.c arm_modifyreg8.c CMN_CSRCS += arm_modifyreg16.c arm_modifyreg32.c arm_releasepending.c CMN_CSRCS += arm_releasestack.c arm_reprioritizertr.c arm_schedulesigaction.c CMN_CSRCS += arm_sigdeliver.c arm_stackframe.c arm_svcall.c arm_systemreset.c -CMN_CSRCS += arm_trigger_irq.c arm_udelay.c arm_unblocktask.c arm_usestack.c arm_vfork.c -CMN_CSRCS += arm_switchcontext.c arm_puts.c arm_tcbinfo.c arm_vectors.c +CMN_CSRCS += arm_trigger_irq.c arm_udelay.c arm_unblocktask.c arm_usestack.c +CMN_CSRCS += arm_vfork.c arm_switchcontext.c arm_saveusercontext.c +CMN_CSRCS += arm_fullcontextrestore.c arm_puts.c arm_tcbinfo.c ifeq ($(CONFIG_ARCH_RAMVECTORS),y) CMN_CSRCS += arm_ramvec_initialize.c arm_ramvec_attach.c diff --git a/arch/arm/src/eoss3/Make.defs b/arch/arm/src/eoss3/Make.defs index 78bb4a150f..5e2ee8bef5 100644 --- a/arch/arm/src/eoss3/Make.defs +++ b/arch/arm/src/eoss3/Make.defs @@ -18,18 +18,18 @@ # ############################################################################ -CMN_ASRCS = arm_saveusercontext.S arm_fullcontextrestore.S -CMN_ASRCS += arm_testset.S arm_fetchadd.S vfork.S arm_exception.S +CMN_ASRCS = arm_testset.S arm_fetchadd.S vfork.S arm_exception.S -CMN_CSRCS = arm_allocateheap.c arm_assert.c arm_blocktask.c +CMN_CSRCS = arm_vectors.c arm_allocateheap.c arm_assert.c arm_blocktask.c CMN_CSRCS += arm_createstack.c arm_doirq.c arm_exit.c arm_hardfault.c CMN_CSRCS += arm_initialize.c arm_initialstate.c arm_interruptcontext.c CMN_CSRCS += arm_itm.c arm_mdelay.c arm_memfault.c arm_modifyreg8.c CMN_CSRCS += arm_modifyreg16.c arm_modifyreg32.c arm_releasepending.c CMN_CSRCS += arm_releasestack.c arm_reprioritizertr.c arm_schedulesigaction.c CMN_CSRCS += arm_sigdeliver.c arm_stackframe.c arm_svcall.c arm_systemreset.c -CMN_CSRCS += arm_trigger_irq.c arm_udelay.c arm_unblocktask.c arm_usestack.c arm_vfork.c -CMN_CSRCS += arm_switchcontext.c arm_puts.c arm_tcbinfo.c arm_vectors.c +CMN_CSRCS += arm_trigger_irq.c arm_udelay.c arm_unblocktask.c arm_usestack.c +CMN_CSRCS += arm_vfork.c arm_switchcontext.c arm_saveusercontext.c +CMN_CSRCS += arm_fullcontextrestore.c arm_puts.c arm_tcbinfo.c ifeq ($(CONFIG_ARCH_RAMVECTORS),y) CMN_CSRCS += arm_ramvec_initialize.c arm_ramvec_attach.c diff --git a/arch/arm/src/imx1/Make.defs b/arch/arm/src/imx1/Make.defs index 965a4a075d..41854e0308 100644 --- a/arch/arm/src/imx1/Make.defs +++ b/arch/arm/src/imx1/Make.defs @@ -20,16 +20,17 @@ HEAD_ASRC = arm_head.S -CMN_ASRCS = arm_cache.S arm_fullcontextrestore.S arm_saveusercontext.S +CMN_ASRCS = arm_cache.S CMN_ASRCS += arm_vectors.S arm_vectoraddrexcptn.S arm_vectortab.S vfork.S + CMN_CSRCS = arm_assert.c arm_blocktask.c arm_createstack.c CMN_CSRCS += arm_dataabort.c arm_mdelay.c arm_udelay.c arm_exit.c CMN_CSRCS += arm_initialize.c arm_initialstate.c arm_interruptcontext.c CMN_CSRCS += arm_prefetchabort.c arm_releasepending.c arm_releasestack.c -CMN_CSRCS += arm_reprioritizertr.c arm_schedulesigaction.c -CMN_CSRCS += arm_sigdeliver.c arm_stackframe.c arm_syscall.c arm_unblocktask.c -CMN_CSRCS += arm_undefinedinsn.c arm_usestack.c arm_vfork.c arm_puts.c -CMN_CSRCS += arm_tcbinfo.c arm_switchcontext.c +CMN_CSRCS += arm_reprioritizertr.c arm_schedulesigaction.c arm_sigdeliver.c +CMN_CSRCS += arm_stackframe.c arm_syscall.c arm_unblocktask.c arm_undefinedinsn.c +CMN_CSRCS += arm_usestack.c arm_vfork.c arm_switchcontext.c arm_saveusercontext.c +CMN_CSRCS += arm_fullcontextrestore.c arm_puts.c arm_tcbinfo.c ifneq ($(CONFIG_ARCH_IDLE_CUSTOM),y) CMN_CSRCS += arm_idle.c diff --git a/arch/arm/src/imx6/Make.defs b/arch/arm/src/imx6/Make.defs index bf3449ee0f..5aad2db3e2 100644 --- a/arch/arm/src/imx6/Make.defs +++ b/arch/arm/src/imx6/Make.defs @@ -44,9 +44,8 @@ endif # Common assembly language files -CMN_ASRCS += arm_vectors.S arm_fpuconfig.S arm_fullcontextrestore.S -CMN_ASRCS += arm_saveusercontext.S arm_vectoraddrexcptn.S -CMN_ASRCS += arm_testset.S arm_fetchadd.S vfork.S +CMN_ASRCS += arm_vectors.S arm_fpuconfig.S +CMN_ASRCS += arm_vectoraddrexcptn.S arm_testset.S arm_fetchadd.S vfork.S CMN_ASRCS += cp15_coherent_dcache.S cp15_invalidate_dcache.S CMN_ASRCS += cp15_clean_dcache.S cp15_flush_dcache.S cp15_invalidate_dcache_all.S CMN_ASRCS += cp15_clean_dcache_all.S cp15_flush_dcache_all.S cp15_cache_size.S @@ -56,14 +55,12 @@ CMN_ASRCS += cp15_clean_dcache_all.S cp15_flush_dcache_all.S cp15_cache_size.S CMN_CSRCS = arm_initialize.c arm_interruptcontext.c arm_exit.c arm_createstack.c CMN_CSRCS += arm_releasestack.c arm_usestack.c arm_vfork.c arm_puts.c arm_mdelay.c CMN_CSRCS += arm_stackframe.c arm_udelay.c arm_modifyreg8.c arm_modifyreg16.c -CMN_CSRCS += arm_modifyreg32.c - -CMN_CSRCS += arm_assert.c arm_blocktask.c arm_dataabort.c +CMN_CSRCS += arm_modifyreg32.c arm_assert.c arm_blocktask.c arm_dataabort.c CMN_CSRCS += arm_doirq.c arm_gicv2.c arm_initialstate.c arm_mmu.c CMN_CSRCS += arm_prefetchabort.c arm_releasepending.c arm_reprioritizertr.c CMN_CSRCS += arm_schedulesigaction.c arm_sigdeliver.c arm_syscall.c -CMN_CSRCS += arm_unblocktask.c arm_undefinedinsn.c arm_tcbinfo.c -CMN_CSRCS += arm_switchcontext.c arm_cache.c +CMN_CSRCS += arm_unblocktask.c arm_undefinedinsn.c arm_switchcontext.c +CMN_CSRCS += arm_saveusercontext.c arm_fullcontextrestore.c arm_cache.c arm_tcbinfo.c ifeq ($(CONFIG_ARM_SEMIHOSTING_HOSTFS),y) CMN_CSRCS += arm_hostfs.c diff --git a/arch/arm/src/imxrt/Make.defs b/arch/arm/src/imxrt/Make.defs index 6a79bdb70d..a66e87f2de 100644 --- a/arch/arm/src/imxrt/Make.defs +++ b/arch/arm/src/imxrt/Make.defs @@ -20,8 +20,7 @@ # Common ARM and Cortex-M7 files -CMN_ASRCS = arm_saveusercontext.S arm_fullcontextrestore.S -CMN_ASRCS += arm_testset.S arm_fetchadd.S vfork.S arm_exception.S +CMN_ASRCS = arm_testset.S arm_fetchadd.S vfork.S arm_exception.S CMN_CSRCS = arm_assert.c arm_blocktask.c CMN_CSRCS += arm_createstack.c arm_mdelay.c arm_udelay.c arm_exit.c @@ -31,7 +30,8 @@ CMN_CSRCS += arm_releasepending.c arm_releasestack.c arm_reprioritizertr.c CMN_CSRCS += arm_schedulesigaction.c arm_sigdeliver.c arm_stackframe.c CMN_CSRCS += arm_unblocktask.c arm_usestack.c arm_doirq.c arm_hardfault.c CMN_CSRCS += arm_svcall.c arm_vfork.c arm_trigger_irq.c arm_systemreset.c -CMN_CSRCS += arm_switchcontext.c arm_puts.c arm_tcbinfo.c arm_vectors.c +CMN_CSRCS += arm_switchcontext.c arm_saveusercontext.c arm_fullcontextrestore.c +CMN_CSRCS += arm_puts.c arm_tcbinfo.c arm_vectors.c ifeq ($(CONFIG_SCHED_BACKTRACE),y) CMN_CSRCS += arm_backtrace_thumb.c diff --git a/arch/arm/src/kinetis/Make.defs b/arch/arm/src/kinetis/Make.defs index 8342cd8b22..bc5f196717 100644 --- a/arch/arm/src/kinetis/Make.defs +++ b/arch/arm/src/kinetis/Make.defs @@ -18,8 +18,7 @@ # ############################################################################ -CMN_ASRCS = arm_saveusercontext.S arm_fullcontextrestore.S -CMN_ASRCS += arm_testset.S arm_fetchadd.S vfork.S arm_exception.S +CMN_ASRCS = arm_testset.S arm_fetchadd.S vfork.S arm_exception.S CMN_CSRCS = arm_assert.c arm_blocktask.c arm_createstack.c arm_vectors.c CMN_CSRCS += arm_mdelay.c arm_udelay.c arm_exit.c arm_initialize.c arm_memfault.c @@ -28,7 +27,8 @@ CMN_CSRCS += arm_modifyreg16.c arm_modifyreg32.c arm_releasestack.c CMN_CSRCS += arm_reprioritizertr.c arm_schedulesigaction.c arm_releasepending.c CMN_CSRCS += arm_sigdeliver.c arm_stackframe.c arm_unblocktask.c arm_usestack.c CMN_CSRCS += arm_doirq.c arm_hardfault.c arm_svcall.c arm_vfork.c -CMN_CSRCS += arm_systemreset.c arm_trigger_irq.c arm_switchcontext.c arm_puts.c +CMN_CSRCS += arm_systemreset.c arm_trigger_irq.c arm_switchcontext.c +CMN_CSRCS += arm_saveusercontext.c arm_fullcontextrestore.c arm_puts.c CMN_CSRCS += arm_tcbinfo.c ifeq ($(CONFIG_SCHED_BACKTRACE),y) diff --git a/arch/arm/src/kl/Make.defs b/arch/arm/src/kl/Make.defs index 851590aca7..62fda843c0 100644 --- a/arch/arm/src/kl/Make.defs +++ b/arch/arm/src/kl/Make.defs @@ -18,8 +18,7 @@ # ############################################################################ -CMN_ASRCS = arm_exception.S arm_saveusercontext.S arm_fullcontextrestore.S -CMN_ASRCS += vfork.S +CMN_ASRCS = arm_exception.S vfork.S CMN_CSRCS = arm_allocateheap.c arm_assert.c arm_blocktask.c CMN_CSRCS += arm_createstack.c arm_mdelay.c arm_udelay.c arm_exit.c @@ -29,7 +28,8 @@ CMN_CSRCS += arm_releasepending.c arm_releasestack.c arm_reprioritizertr.c CMN_CSRCS += arm_schedulesigaction.c arm_sigdeliver.c arm_stackframe.c CMN_CSRCS += arm_systemreset.c arm_unblocktask.c arm_usestack.c arm_doirq.c CMN_CSRCS += arm_hardfault.c arm_svcall.c arm_vectors.c arm_vfork.c -CMN_CSRCS += arm_switchcontext.c arm_tcbinfo.c +CMN_CSRCS += arm_switchcontext.c arm_saveusercontext.c arm_fullcontextrestore.c +CMN_CSRCS += arm_tcbinfo.c ifeq ($(CONFIG_BUILD_PROTECTED),y) CMN_CSRCS += arm_task_start.c arm_pthread_start.c diff --git a/arch/arm/src/lc823450/Make.defs b/arch/arm/src/lc823450/Make.defs index 588e4f8544..5eb872bf50 100644 --- a/arch/arm/src/lc823450/Make.defs +++ b/arch/arm/src/lc823450/Make.defs @@ -18,8 +18,7 @@ # ############################################################################ -CMN_ASRCS = arm_saveusercontext.S arm_fullcontextrestore.S -CMN_ASRCS += vfork.S arm_exception.S +CMN_ASRCS = vfork.S arm_exception.S CMN_CSRCS = arm_assert.c arm_blocktask.c CMN_CSRCS += arm_createstack.c arm_mdelay.c arm_udelay.c arm_exit.c @@ -29,6 +28,7 @@ CMN_CSRCS += arm_releasepending.c arm_releasestack.c arm_reprioritizertr.c CMN_CSRCS += arm_schedulesigaction.c arm_sigdeliver.c arm_systemreset.c CMN_CSRCS += arm_unblocktask.c arm_usestack.c arm_doirq.c arm_hardfault.c CMN_CSRCS += arm_svcall.c arm_vfork.c arm_trigger_irq.c arm_switchcontext.c +CMN_CSRCS += arm_saveusercontext.c arm_fullcontextrestore.c CMN_CSRCS += arm_puts.c arm_tcbinfo.c arm_stackframe.c arm_vectors.c ifeq ($(CONFIG_SCHED_BACKTRACE),y) diff --git a/arch/arm/src/lpc17xx_40xx/Make.defs b/arch/arm/src/lpc17xx_40xx/Make.defs index df62de2f2d..082ac20391 100644 --- a/arch/arm/src/lpc17xx_40xx/Make.defs +++ b/arch/arm/src/lpc17xx_40xx/Make.defs @@ -20,8 +20,7 @@ # Common ARM and Cortex-M3 files -CMN_ASRCS = arm_saveusercontext.S arm_fullcontextrestore.S -CMN_ASRCS += arm_testset.S arm_fetchadd.S vfork.S arm_exception.S +CMN_ASRCS = arm_testset.S arm_fetchadd.S vfork.S arm_exception.S CMN_CSRCS = arm_assert.c arm_blocktask.c arm_createstack.c arm_vectors.c CMN_CSRCS += arm_mdelay.c arm_udelay.c arm_exit.c arm_initialize.c arm_memfault.c @@ -31,7 +30,8 @@ CMN_CSRCS += arm_releasestack.c arm_reprioritizertr.c arm_schedulesigaction.c CMN_CSRCS += arm_sigdeliver.c arm_stackframe.c arm_trigger_irq.c CMN_CSRCS += arm_unblocktask.c arm_usestack.c arm_doirq.c arm_hardfault.c CMN_CSRCS += arm_svcall.c arm_checkstack.c arm_vfork.c arm_switchcontext.c -CMN_CSRCS += arm_systemreset.c arm_puts.c arm_tcbinfo.c arm_perf.c +CMN_CSRCS += arm_saveusercontext.c arm_fullcontextrestore.c arm_systemreset.c +CMN_CSRCS += arm_puts.c arm_tcbinfo.c arm_perf.c ifeq ($(CONFIG_SCHED_BACKTRACE),y) CMN_CSRCS += arm_backtrace_thumb.c diff --git a/arch/arm/src/lpc214x/Make.defs b/arch/arm/src/lpc214x/Make.defs index 3769326f9a..aa9f4f8abe 100644 --- a/arch/arm/src/lpc214x/Make.defs +++ b/arch/arm/src/lpc214x/Make.defs @@ -19,9 +19,7 @@ ############################################################################## HEAD_ASRC = lpc214x_head.S - -CMN_ASRCS = arm_saveusercontext.S arm_fullcontextrestore.S arm_vectors.S -CMN_ASRCS += vfork.S +CMN_ASRCS = arm_vectors.S vfork.S CMN_CSRCS = arm_allocateheap.c arm_assert.c arm_blocktask.c CMN_CSRCS += arm_createstack.c arm_dataabort.c arm_mdelay.c arm_udelay.c @@ -29,9 +27,9 @@ CMN_CSRCS += arm_exit.c arm_initialize.c arm_initialstate.c CMN_CSRCS += arm_interruptcontext.c arm_prefetchabort.c arm_releasepending.c CMN_CSRCS += arm_releasestack.c arm_reprioritizertr.c arm_stackframe.c CMN_CSRCS += arm_syscall.c arm_unblocktask.c arm_undefinedinsn.c arm_usestack.c -CMN_CSRCS += arm_schedulesigaction.c arm_sigdeliver.c -CMN_CSRCS += arm_lowputs.c arm_vfork.c arm_puts.c arm_tcbinfo.c -CMN_CSRCS += arm_switchcontext.c +CMN_CSRCS += arm_schedulesigaction.c arm_sigdeliver.c arm_lowputs.c arm_vfork.c +CMN_CSRCS += arm_switchcontext.c arm_saveusercontext.c arm_fullcontextrestore.c +CMN_CSRCS += arm_puts.c arm_tcbinfo.c ifneq ($(CONFIG_ARCH_IDLE_CUSTOM),y) CMN_CSRCS += arm_idle.c diff --git a/arch/arm/src/lpc2378/Make.defs b/arch/arm/src/lpc2378/Make.defs index 24ae5dd5e3..c6c84cac6f 100644 --- a/arch/arm/src/lpc2378/Make.defs +++ b/arch/arm/src/lpc2378/Make.defs @@ -19,18 +19,17 @@ ############################################################################## HEAD_ASRC = lpc23xx_head.S +CMN_ASRCS = arm_vectors.S vfork.S -CMN_ASRCS = arm_saveusercontext.S arm_fullcontextrestore.S arm_vectors.S -CMN_ASRCS += vfork.S CMN_CSRCS = arm_allocateheap.c arm_assert.c arm_blocktask.c CMN_CSRCS += arm_createstack.c arm_dataabort.c arm_mdelay.c arm_udelay.c CMN_CSRCS += arm_exit.c arm_initialize.c arm_initialstate.c CMN_CSRCS += arm_interruptcontext.c arm_prefetchabort.c arm_releasepending.c CMN_CSRCS += arm_releasestack.c arm_reprioritizertr.c arm_stackframe.c CMN_CSRCS += arm_syscall.c arm_unblocktask.c arm_undefinedinsn.c -CMN_CSRCS += arm_usestack.c arm_lowputs.c arm_vfork.c -CMN_CSRCS += arm_schedulesigaction.c arm_sigdeliver.c arm_puts.c arm_tcbinfo.c -CMN_CSRCS += arm_switchcontext.c +CMN_CSRCS += arm_usestack.c arm_lowputs.c arm_vfork.c arm_schedulesigaction.c +CMN_CSRCS += arm_sigdeliver.c arm_switchcontext.c arm_saveusercontext.c +CMN_CSRCS += arm_fullcontextrestore.c arm_puts.c arm_tcbinfo.c ifneq ($(CONFIG_ARCH_IDLE_CUSTOM),y) CMN_CSRCS += arm_idle.c diff --git a/arch/arm/src/lpc31xx/Make.defs b/arch/arm/src/lpc31xx/Make.defs index ae31963b37..d6c140417e 100644 --- a/arch/arm/src/lpc31xx/Make.defs +++ b/arch/arm/src/lpc31xx/Make.defs @@ -20,7 +20,7 @@ HEAD_ASRC = arm_head.S -CMN_ASRCS = arm_cache.S arm_fullcontextrestore.S arm_saveusercontext.S +CMN_ASRCS = arm_cache.S CMN_ASRCS += arm_vectors.S arm_vectoraddrexcptn.S arm_vectortab.S vfork.S CMN_CSRCS = arm_assert.c arm_blocktask.c arm_createstack.c @@ -30,8 +30,8 @@ CMN_CSRCS += arm_modifyreg8.c arm_modifyreg16.c arm_modifyreg32.c CMN_CSRCS += arm_prefetchabort.c arm_releasepending.c arm_releasestack.c CMN_CSRCS += arm_reprioritizertr.c arm_schedulesigaction.c CMN_CSRCS += arm_sigdeliver.c arm_stackframe.c arm_syscall.c arm_unblocktask.c -CMN_CSRCS += arm_undefinedinsn.c arm_usestack.c arm_vfork.c arm_puts.c -CMN_CSRCS += arm_tcbinfo.c arm_switchcontext.c +CMN_CSRCS += arm_undefinedinsn.c arm_usestack.c arm_vfork.c arm_switchcontext.c +CMN_CSRCS += arm_saveusercontext.c arm_fullcontextrestore.c arm_puts.c arm_tcbinfo.c ifneq ($(CONFIG_ARCH_IDLE_CUSTOM),y) CMN_CSRCS += arm_idle.c diff --git a/arch/arm/src/lpc43xx/Make.defs b/arch/arm/src/lpc43xx/Make.defs index 26000361a9..d6f2641363 100644 --- a/arch/arm/src/lpc43xx/Make.defs +++ b/arch/arm/src/lpc43xx/Make.defs @@ -18,8 +18,7 @@ # ############################################################################ -CMN_ASRCS = arm_saveusercontext.S arm_fullcontextrestore.S -CMN_ASRCS += arm_testset.S arm_fetchadd.S vfork.S arm_exception.S +CMN_ASRCS = arm_testset.S arm_fetchadd.S vfork.S arm_exception.S CMN_CSRCS = arm_assert.c arm_blocktask.c arm_createstack.c arm_vectors.c CMN_CSRCS += arm_doirq.c arm_exit.c arm_hardfault.c arm_initialize.c @@ -28,8 +27,8 @@ CMN_CSRCS += arm_memfault.c arm_modifyreg8.c arm_modifyreg16.c arm_modifyreg32.c CMN_CSRCS += arm_releasepending.c arm_releasestack.c arm_reprioritizertr.c CMN_CSRCS += arm_schedulesigaction.c arm_sigdeliver.c arm_stackframe.c CMN_CSRCS += arm_svcall.c arm_trigger_irq.c arm_unblocktask.c arm_udelay.c -CMN_CSRCS += arm_usestack.c arm_vfork.c arm_switchcontext.c arm_puts.c -CMN_CSRCS += arm_tcbinfo.c +CMN_CSRCS += arm_usestack.c arm_vfork.c arm_switchcontext.c arm_saveusercontext.c +CMN_CSRCS += arm_fullcontextrestore.c arm_puts.c arm_tcbinfo.c ifeq ($(CONFIG_ARCH_RAMVECTORS),y) CMN_CSRCS += arm_ramvec_initialize.c arm_ramvec_attach.c diff --git a/arch/arm/src/lpc54xx/Make.defs b/arch/arm/src/lpc54xx/Make.defs index 92a335ceff..09ff71d060 100644 --- a/arch/arm/src/lpc54xx/Make.defs +++ b/arch/arm/src/lpc54xx/Make.defs @@ -18,8 +18,7 @@ # ############################################################################ -CMN_ASRCS = arm_saveusercontext.S arm_fullcontextrestore.S -CMN_ASRCS += arm_testset.S arm_fetchadd.S vfork.S arm_exception.S +CMN_ASRCS = arm_testset.S arm_fetchadd.S vfork.S arm_exception.S CMN_CSRCS = arm_assert.c arm_blocktask.c arm_createstack.c arm_vectors.c CMN_CSRCS += arm_doirq.c arm_exit.c arm_hardfault.c arm_initialize.c @@ -28,8 +27,8 @@ CMN_CSRCS += arm_memfault.c arm_modifyreg8.c arm_modifyreg16.c arm_modifyreg32.c CMN_CSRCS += arm_releasepending.c arm_releasestack.c arm_reprioritizertr.c CMN_CSRCS += arm_schedulesigaction.c arm_sigdeliver.c arm_stackframe.c CMN_CSRCS += arm_svcall.c arm_trigger_irq.c arm_unblocktask.c arm_udelay.c -CMN_CSRCS += arm_usestack.c arm_vfork.c arm_switchcontext.c arm_puts.c -CMN_CSRCS += arm_tcbinfo.c +CMN_CSRCS += arm_usestack.c arm_vfork.c arm_switchcontext.c arm_saveusercontext.c +CMN_CSRCS += arm_fullcontextrestore.c arm_puts.c arm_tcbinfo.c ifeq ($(CONFIG_ARCH_RAMVECTORS),y) CMN_CSRCS += arm_ramvec_initialize.c arm_ramvec_attach.c diff --git a/arch/arm/src/max326xx/Make.defs b/arch/arm/src/max326xx/Make.defs index 303c859dfc..50b40298af 100644 --- a/arch/arm/src/max326xx/Make.defs +++ b/arch/arm/src/max326xx/Make.defs @@ -20,8 +20,7 @@ # Common ARMv7-M Source Files -CMN_ASRCS = arm_saveusercontext.S arm_fullcontextrestore.S -CMN_ASRCS += arm_testset.S arm_fetchadd.S vfork.S arm_exception.S +CMN_ASRCS = arm_testset.S arm_fetchadd.S vfork.S arm_exception.S CMN_CSRCS = arm_allocateheap.c arm_assert.c arm_blocktask.c arm_vectors.c CMN_CSRCS += arm_createstack.c arm_doirq.c arm_exit.c arm_hardfault.c @@ -31,6 +30,7 @@ CMN_CSRCS += arm_modifyreg32.c arm_releasepending.c arm_releasestack.c CMN_CSRCS += arm_reprioritizertr.c arm_schedulesigaction.c arm_sigdeliver.c CMN_CSRCS += arm_stackframe.c arm_svcall.c arm_trigger_irq.c arm_unblocktask.c CMN_CSRCS += arm_udelay.c arm_usestack.c arm_vfork.c arm_switchcontext.c +CMN_CSRCS += arm_saveusercontext.c arm_fullcontextrestore.c CMN_CSRCS += arm_puts.c arm_tcbinfo.c ifeq ($(CONFIG_ARCH_RAMVECTORS),y) diff --git a/arch/arm/src/moxart/Make.defs b/arch/arm/src/moxart/Make.defs index d7756df676..fdfebec530 100644 --- a/arch/arm/src/moxart/Make.defs +++ b/arch/arm/src/moxart/Make.defs @@ -19,9 +19,8 @@ ############################################################################ HEAD_ASRC = moxart_head.S +CMN_ASRCS = arm_vectors.S arm_nommuhead.S vfork.S -CMN_ASRCS = arm_saveusercontext.S arm_fullcontextrestore.S arm_vectors.S -CMN_ASRCS += arm_nommuhead.S vfork.S CMN_CSRCS = arm_allocateheap.c arm_assert.c arm_blocktask.c CMN_CSRCS += arm_createstack.c arm_dataabort.c arm_mdelay.c arm_udelay.c CMN_CSRCS += arm_exit.c arm_initialstate.c arm_initialize.c @@ -29,7 +28,8 @@ CMN_CSRCS += arm_interruptcontext.c arm_prefetchabort.c arm_releasepending.c CMN_CSRCS += arm_releasestack.c arm_reprioritizertr.c arm_schedulesigaction.c CMN_CSRCS += arm_sigdeliver.c arm_stackframe.c arm_syscall.c arm_unblocktask.c CMN_CSRCS += arm_undefinedinsn.c arm_usestack.c arm_vfork.c arm_etherstub.c -CMN_CSRCS += arm_puts.c arm_tcbinfo.c arm_switchcontext.c +CMN_CSRCS += arm_switchcontext.c arm_saveusercontext.c arm_fullcontextrestore.c +CMN_CSRCS += arm_puts.c arm_tcbinfo.c CHIP_ASRCS = moxart_lowputc.S diff --git a/arch/arm/src/nrf52/Make.defs b/arch/arm/src/nrf52/Make.defs index 9a32a31b3f..1b65e07040 100644 --- a/arch/arm/src/nrf52/Make.defs +++ b/arch/arm/src/nrf52/Make.defs @@ -18,8 +18,7 @@ # ############################################################################ -CMN_ASRCS = arm_saveusercontext.S arm_fullcontextrestore.S -CMN_ASRCS += arm_testset.S vfork.S arm_exception.S +CMN_ASRCS = arm_testset.S vfork.S arm_exception.S CMN_CSRCS = arm_assert.c arm_blocktask.c arm_vectors.c CMN_CSRCS += arm_createstack.c arm_doirq.c arm_exit.c arm_hardfault.c @@ -29,7 +28,8 @@ CMN_CSRCS += arm_modifyreg32.c arm_releasepending.c arm_releasestack.c CMN_CSRCS += arm_reprioritizertr.c arm_schedulesigaction.c arm_sigdeliver.c CMN_CSRCS += arm_stackframe.c arm_svcall.c arm_trigger_irq.c arm_udelay.c CMN_CSRCS += arm_unblocktask.c arm_usestack.c arm_vfork.c arm_systemreset.c -CMN_CSRCS += arm_switchcontext.c arm_puts.c arm_tcbinfo.c +CMN_CSRCS += arm_switchcontext.c arm_saveusercontext.c arm_fullcontextrestore.c +CMN_CSRCS += arm_puts.c arm_tcbinfo.c ifeq ($(CONFIG_NRF52_SYSTIMER_SYSTICK),y) CMN_CSRCS += arm_systick.c nrf52_systick.c diff --git a/arch/arm/src/nuc1xx/Make.defs b/arch/arm/src/nuc1xx/Make.defs index eac50f6ef3..0c8f73d2df 100644 --- a/arch/arm/src/nuc1xx/Make.defs +++ b/arch/arm/src/nuc1xx/Make.defs @@ -18,8 +18,7 @@ # ############################################################################ -CMN_ASRCS = arm_exception.S arm_saveusercontext.S arm_fullcontextrestore.S -CMN_ASRCS += vfork.S +CMN_ASRCS = arm_exception.S vfork.S CMN_CSRCS = arm_allocateheap.c arm_assert.c arm_blocktask.c CMN_CSRCS += arm_createstack.c arm_mdelay.c arm_udelay.c arm_exit.c @@ -29,7 +28,8 @@ CMN_CSRCS += arm_releasepending.c arm_releasestack.c arm_reprioritizertr.c CMN_CSRCS += arm_schedulesigaction.c arm_sigdeliver.c arm_stackframe.c CMN_CSRCS += arm_systemreset.c arm_unblocktask.c arm_usestack.c arm_doirq.c CMN_CSRCS += arm_hardfault.c arm_svcall.c arm_vectors.c arm_vfork.c -CMN_CSRCS += arm_switchcontext.c arm_puts.c arm_tcbinfo.c +CMN_CSRCS += arm_switchcontext.c arm_saveusercontext.c +CMN_CSRCS += arm_fullcontextrestore.c arm_puts.c arm_tcbinfo.c ifeq ($(CONFIG_BUILD_PROTECTED),y) CMN_CSRCS += arm_task_start.c arm_pthread_start.c diff --git a/arch/arm/src/phy62xx/Make.defs b/arch/arm/src/phy62xx/Make.defs index 1d28be466b..bad299a1d6 100644 --- a/arch/arm/src/phy62xx/Make.defs +++ b/arch/arm/src/phy62xx/Make.defs @@ -18,9 +18,7 @@ # ############################################################################ -CMN_ASRCS = phy62xx_exception.S phy62xx_start.S arm_saveusercontext.S arm_fullcontextrestore.S -#CMN_ASRCS += arm_switchcontext.S vfork.S -CMN_ASRCS += vfork.S +CMN_ASRCS = phy62xx_exception.S phy62xx_start.S vfork.S CMN_CSRCS = arm_allocateheap.c arm_assert.c arm_blocktask.c CMN_CSRCS += arm_createstack.c arm_mdelay.c arm_udelay.c arm_exit.c @@ -29,10 +27,9 @@ CMN_CSRCS += arm_puts.c arm_modifyreg8.c arm_modifyreg16.c arm_modifyreg32.c CMN_CSRCS += arm_releasepending.c arm_releasestack.c arm_reprioritizertr.c CMN_CSRCS += arm_schedulesigaction.c arm_sigdeliver.c arm_stackframe.c CMN_CSRCS += arm_systemreset.c arm_unblocktask.c arm_usestack.c arm_doirq.c -#CMN_CSRCS += arm_hardfault.c arm_svcall.c arm_vectors.c arm_vfork.c CMN_CSRCS += phy62xx_hardfault.c arm_svcall.c arm_vectors.c arm_vfork.c -#CMN_CSRCS += arm_etherstub.c -CMN_CSRCS += arm_switchcontext.c arm_tcbinfo.c +CMN_CSRCS += arm_switchcontext.c arm_saveusercontext.c +CMN_CSRCS += arm_fullcontextrestore.c arm_tcbinfo.c ifeq ($(CONFIG_ARCH_HAVE_BACKTRACE),y) CMN_CSRCS += arm_backtrace_thumb.c diff --git a/arch/arm/src/rp2040/Make.defs b/arch/arm/src/rp2040/Make.defs index 303386ed96..8f2e62eac1 100644 --- a/arch/arm/src/rp2040/Make.defs +++ b/arch/arm/src/rp2040/Make.defs @@ -18,8 +18,7 @@ # ############################################################################ -CMN_ASRCS = arm_exception.S arm_saveusercontext.S arm_fullcontextrestore.S -CMN_ASRCS += vfork.S +CMN_ASRCS = arm_exception.S vfork.S CMN_CSRCS = arm_allocateheap.c arm_assert.c arm_blocktask.c CMN_CSRCS += arm_createstack.c arm_mdelay.c arm_udelay.c arm_exit.c @@ -29,7 +28,8 @@ CMN_CSRCS += arm_releasepending.c arm_releasestack.c arm_reprioritizertr.c CMN_CSRCS += arm_schedulesigaction.c arm_sigdeliver.c arm_stackframe.c CMN_CSRCS += arm_systemreset.c arm_unblocktask.c arm_usestack.c arm_doirq.c CMN_CSRCS += arm_hardfault.c arm_svcall.c arm_vectors.c arm_vfork.c -CMN_CSRCS += arm_switchcontext.c arm_puts.c arm_tcbinfo.c +CMN_CSRCS += arm_switchcontext.c arm_saveusercontext.c +CMN_CSRCS += arm_fullcontextrestore.c arm_puts.c arm_tcbinfo.c ifeq ($(CONFIG_ARCH_RAMVECTORS),y) CMN_CSRCS += arm_ramvec_initialize.c arm_ramvec_attach.c diff --git a/arch/arm/src/rtl8720c/Make.defs b/arch/arm/src/rtl8720c/Make.defs index 33948b19c1..16b9b00391 100644 --- a/arch/arm/src/rtl8720c/Make.defs +++ b/arch/arm/src/rtl8720c/Make.defs @@ -29,7 +29,6 @@ CMN_CSRCS += arm_stackframe.c arm_task_start.c arm_usestack.c arm_vfork.c # arch/arm/src/armv8-m # CMN_ASRCS += arm_exception.S arm_fetchadd.S arm_setjmp.S -CMN_ASRCS += arm_fullcontextrestore.S arm_saveusercontext.S CMN_ASRCS += arm_testset.S vfork.S CMN_UASRCS += arm_signal_handler.S @@ -40,7 +39,8 @@ CMN_CSRCS += arm_itm_syslog.c arm_memfault.c arm_mpu.c arm_ramvec_attach.c CMN_CSRCS += arm_ramvec_initialize.c arm_releasepending.c arm_reprioritizertr.c CMN_CSRCS += arm_schedulesigaction.c arm_sigdeliver.c arm_signal_dispatch.c CMN_CSRCS += arm_stackcheck.c arm_svcall.c arm_systick.c arm_unblocktask.c -CMN_CSRCS += arm_switchcontext.c arm_tcbinfo.c +CMN_CSRCS += arm_switchcontext.c arm_saveusercontext.c arm_fullcontextrestore.c +CMN_CSRCS += arm_tcbinfo.c ifeq ($(CONFIG_SCHED_BACKTRACE),y) CMN_CSRCS += arm_backtrace_thumb.c @@ -48,8 +48,8 @@ endif # arch/arm/src/rtl8720c # -CHIP_CSRCS += ameba_nvic.c ameba_heap.c ameba_idle.c ameba_uart.c ameba_start.c ameba_vectors.c -CHIP_CSRCS += ameba_efuse.c ameba_flash.c ameba_wdt.c ameba_hci.c +CHIP_CSRCS += ameba_nvic.c ameba_heap.c ameba_idle.c ameba_uart.c ameba_start.c +CHIP_CSRCS += ameba_vectors.c ameba_efuse.c ameba_flash.c ameba_wdt.c ameba_hci.c CHIP_ASRCS += ameba_lto.S diff --git a/arch/arm/src/s32k1xx/s32k11x/Make.defs b/arch/arm/src/s32k1xx/s32k11x/Make.defs index 6c86a673e7..eff84156b9 100644 --- a/arch/arm/src/s32k1xx/s32k11x/Make.defs +++ b/arch/arm/src/s32k1xx/s32k11x/Make.defs @@ -20,14 +20,14 @@ # Source files specific to the Cortex-M0+ -CMN_ASRCS += arm_exception.S arm_saveusercontext.S arm_fullcontextrestore.S -CMN_ASRCS += vfork.S +CMN_ASRCS += arm_exception.S vfork.S CMN_CSRCS += arm_assert.c arm_blocktask.c arm_createstack.c CMN_CSRCS += arm_initialstate.c arm_releasepending.c arm_reprioritizertr.c CMN_CSRCS += arm_schedulesigaction.c arm_sigdeliver.c arm_systemreset.c CMN_CSRCS += arm_unblocktask.c arm_doirq.c arm_hardfault.c arm_svcall.c -CMN_CSRCS += arm_vectors.c arm_switchcontext.c +CMN_CSRCS += arm_vectors.c arm_switchcontext.c arm_saveusercontext.c +CMN_CSRCS += arm_fullcontextrestore.c ifeq ($(CONFIG_BUILD_PROTECTED),y) CMN_CSRCS += arm_signal_dispatch.c diff --git a/arch/arm/src/s32k1xx/s32k14x/Make.defs b/arch/arm/src/s32k1xx/s32k14x/Make.defs index 64942b1148..4030be05e1 100644 --- a/arch/arm/src/s32k1xx/s32k14x/Make.defs +++ b/arch/arm/src/s32k1xx/s32k14x/Make.defs @@ -20,14 +20,14 @@ # Source files specific to the Cortex-M4F -CMN_ASRCS += arm_saveusercontext.S arm_fullcontextrestore.S -CMN_ASRCS += arm_testset.S arm_fetchadd.S vfork.S arm_exception.S +CMN_ASRCS = arm_testset.S arm_fetchadd.S vfork.S arm_exception.S CMN_CSRCS += arm_assert.c arm_blocktask.c arm_createstack.c arm_vectors.c CMN_CSRCS += arm_doirq.c arm_hardfault.c arm_initialstate.c arm_memfault.c CMN_CSRCS += arm_releasepending.c arm_reprioritizertr.c arm_schedulesigaction.c CMN_CSRCS += arm_sigdeliver.c arm_svcall.c arm_trigger_irq.c arm_unblocktask.c -CMN_CSRCS += arm_systemreset.c arm_switchcontext.c +CMN_CSRCS += arm_systemreset.c arm_switchcontext.c arm_saveusercontext.c +CMN_CSRCS += arm_fullcontextrestore.c ifeq ($(CONFIG_ARCH_RAMVECTORS),y) CMN_CSRCS += arm_ramvec_initialize.c arm_ramvec_attach.c diff --git a/arch/arm/src/sam34/Make.defs b/arch/arm/src/sam34/Make.defs index 412112dd04..1646907990 100644 --- a/arch/arm/src/sam34/Make.defs +++ b/arch/arm/src/sam34/Make.defs @@ -22,8 +22,7 @@ # Common ARM and Cortex-M3 files -CMN_ASRCS = arm_saveusercontext.S arm_fullcontextrestore.S -CMN_ASRCS += arm_testset.S arm_fetchadd.S vfork.S arm_exception.S +CMN_ASRCS = arm_testset.S arm_fetchadd.S vfork.S arm_exception.S CMN_CSRCS = arm_assert.c arm_blocktask.c arm_createstack.c arm_vectors.c CMN_CSRCS += arm_doirq.c arm_exit.c arm_hardfault.c arm_initialize.c @@ -32,8 +31,8 @@ CMN_CSRCS += arm_memfault.c arm_modifyreg8.c arm_modifyreg16.c arm_modifyreg32.c CMN_CSRCS += arm_releasepending.c arm_releasestack.c arm_reprioritizertr.c CMN_CSRCS += arm_schedulesigaction.c arm_sigdeliver.c arm_stackframe.c CMN_CSRCS += arm_svcall.c arm_trigger_irq.c arm_unblocktask.c arm_udelay.c -CMN_CSRCS += arm_usestack.c arm_vfork.c arm_switchcontext.c arm_puts.c -CMN_CSRCS += arm_tcbinfo.c +CMN_CSRCS += arm_usestack.c arm_vfork.c arm_switchcontext.c arm_saveusercontext.c +CMN_CSRCS += arm_fullcontextrestore.c arm_puts.c arm_tcbinfo.c ifneq ($(CONFIG_SMP),y) ifneq ($(CONFIG_ARCH_IDLE_CUSTOM),y) diff --git a/arch/arm/src/sama5/Make.defs b/arch/arm/src/sama5/Make.defs index c1fff66689..fb6e5900a2 100644 --- a/arch/arm/src/sama5/Make.defs +++ b/arch/arm/src/sama5/Make.defs @@ -41,8 +41,7 @@ endif # Common assembly language files -CMN_ASRCS += arm_vectors.S arm_fpuconfig.S arm_fullcontextrestore.S -CMN_ASRCS += arm_saveusercontext.S arm_vectoraddrexcptn.S +CMN_ASRCS += arm_vectors.S arm_fpuconfig.S arm_vectoraddrexcptn.S CMN_ASRCS += arm_testset.S arm_fetchadd.S vfork.S CMN_ASRCS += cp15_coherent_dcache.S cp15_invalidate_dcache.S CMN_ASRCS += cp15_clean_dcache.S cp15_flush_dcache.S cp15_invalidate_dcache_all.S @@ -55,14 +54,12 @@ CMN_ASRCS += cp15_clean_dcache_all.S cp15_flush_dcache_all.S cp15_cache_size.S CMN_CSRCS = arm_initialize.c arm_interruptcontext.c arm_exit.c arm_createstack.c CMN_CSRCS += arm_releasestack.c arm_usestack.c arm_vfork.c arm_puts.c arm_mdelay.c CMN_CSRCS += arm_stackframe.c arm_udelay.c arm_modifyreg8.c arm_modifyreg16.c -CMN_CSRCS += arm_modifyreg32.c - -CMN_CSRCS += arm_assert.c arm_blocktask.c arm_dataabort.c +CMN_CSRCS += arm_modifyreg32.c arm_assert.c arm_blocktask.c arm_dataabort.c CMN_CSRCS += arm_doirq.c arm_initialstate.c arm_mmu.c arm_prefetchabort.c -CMN_CSRCS += arm_releasepending.c arm_reprioritizertr.c +CMN_CSRCS += arm_releasepending.c arm_reprioritizertr.c arm_cache.c CMN_CSRCS += arm_schedulesigaction.c arm_sigdeliver.c arm_syscall.c CMN_CSRCS += arm_unblocktask.c arm_undefinedinsn.c arm_tcbinfo.c -CMN_CSRCS += arm_switchcontext.c arm_cache.c +CMN_CSRCS += arm_switchcontext.c arm_saveusercontext.c arm_fullcontextrestore.c # Configuration dependent C files diff --git a/arch/arm/src/samd2l2/Make.defs b/arch/arm/src/samd2l2/Make.defs index 193df44867..7f747e90a0 100644 --- a/arch/arm/src/samd2l2/Make.defs +++ b/arch/arm/src/samd2l2/Make.defs @@ -18,8 +18,7 @@ # ############################################################################ -CMN_ASRCS = arm_exception.S arm_saveusercontext.S arm_fullcontextrestore.S -CMN_ASRCS += vfork.S +CMN_ASRCS = arm_exception.S vfork.S CMN_CSRCS = arm_allocateheap.c arm_assert.c arm_blocktask.c CMN_CSRCS += arm_createstack.c arm_mdelay.c arm_udelay.c arm_exit.c @@ -29,7 +28,8 @@ CMN_CSRCS += arm_releasepending.c arm_releasestack.c arm_reprioritizertr.c CMN_CSRCS += arm_schedulesigaction.c arm_sigdeliver.c arm_stackframe.c CMN_CSRCS += arm_systemreset.c arm_unblocktask.c arm_usestack.c arm_doirq.c CMN_CSRCS += arm_hardfault.c arm_svcall.c arm_vectors.c arm_vfork.c -CMN_CSRCS += arm_switchcontext.c arm_puts.c arm_tcbinfo.c +CMN_CSRCS += arm_switchcontext.c arm_saveusercontext.c +CMN_CSRCS += arm_fullcontextrestore.c arm_puts.c arm_tcbinfo.c ifeq ($(CONFIG_BUILD_PROTECTED),y) CMN_CSRCS += arm_task_start.c arm_pthread_start.c diff --git a/arch/arm/src/samd5e5/Make.defs b/arch/arm/src/samd5e5/Make.defs index d41549e18f..db7045b105 100644 --- a/arch/arm/src/samd5e5/Make.defs +++ b/arch/arm/src/samd5e5/Make.defs @@ -22,8 +22,7 @@ # Common ARM and Cortex-M4 files -CMN_ASRCS = arm_saveusercontext.S arm_fullcontextrestore.S -CMN_ASRCS += arm_testset.S arm_fetchadd.S vfork.S arm_exception.S +CMN_ASRCS = arm_testset.S arm_fetchadd.S vfork.S arm_exception.S CMN_CSRCS = arm_allocateheap.c arm_assert.c arm_blocktask.c arm_vectors.c CMN_CSRCS += arm_createstack.c arm_exit.c arm_initialize.c arm_initialstate.c @@ -32,8 +31,8 @@ CMN_CSRCS += arm_modifyreg16.c arm_modifyreg32.c arm_releasepending.c CMN_CSRCS += arm_releasestack.c arm_reprioritizertr.c arm_schedulesigaction.c CMN_CSRCS += arm_sigdeliver.c arm_stackframe.c arm_svcall.c arm_trigger_irq.c CMN_CSRCS += arm_unblocktask.c arm_udelay.c arm_usestack.c arm_doirq.c -CMN_CSRCS += arm_hardfault.c arm_vfork.c arm_switchcontext.c arm_puts.c -CMN_CSRCS += arm_tcbinfo.c +CMN_CSRCS += arm_hardfault.c arm_vfork.c arm_switchcontext.c arm_saveusercontext.c +CMN_CSRCS += arm_fullcontextrestore.c arm_tcbinfo.c arm_puts.c # Configuration-dependent common files diff --git a/arch/arm/src/samv7/Make.defs b/arch/arm/src/samv7/Make.defs index 4d6a8f5796..09b436dc43 100644 --- a/arch/arm/src/samv7/Make.defs +++ b/arch/arm/src/samv7/Make.defs @@ -23,8 +23,7 @@ # Common ARM and Cortex-M7 files -CMN_ASRCS = arm_saveusercontext.S arm_fullcontextrestore.S -CMN_ASRCS += arm_testset.S arm_fetchadd.S vfork.S arm_exception.S +CMN_ASRCS = arm_testset.S arm_fetchadd.S vfork.S arm_exception.S CMN_CSRCS = arm_assert.c arm_blocktask.c arm_createstack.c arm_vectors.c CMN_CSRCS += arm_exit.c arm_hardfault.c arm_initialize.c arm_initialstate.c @@ -33,8 +32,8 @@ CMN_CSRCS += arm_memfault.c arm_modifyreg8.c arm_modifyreg16.c arm_modifyreg32.c CMN_CSRCS += arm_releasepending.c arm_releasestack.c arm_reprioritizertr.c CMN_CSRCS += arm_schedulesigaction.c arm_sigdeliver.c arm_stackframe.c CMN_CSRCS += arm_svcall.c arm_trigger_irq.c arm_unblocktask.c arm_usestack.c -CMN_CSRCS += arm_doirq.c arm_vfork.c arm_switchcontext.c arm_puts.c -CMN_CSRCS += arm_tcbinfo.c arm_cache.c +CMN_CSRCS += arm_doirq.c arm_vfork.c arm_switchcontext.c arm_saveusercontext.c +CMN_CSRCS += arm_fullcontextrestore.c arm_puts.c arm_tcbinfo.c arm_cache.c # Configuration-dependent common files diff --git a/arch/arm/src/stm32/Make.defs b/arch/arm/src/stm32/Make.defs index 2269b1637f..e3856744a0 100644 --- a/arch/arm/src/stm32/Make.defs +++ b/arch/arm/src/stm32/Make.defs @@ -18,8 +18,7 @@ # ############################################################################ -CMN_ASRCS = arm_saveusercontext.S arm_fullcontextrestore.S -CMN_ASRCS += arm_testset.S arm_fetchadd.S vfork.S arm_exception.S +CMN_ASRCS = arm_testset.S arm_fetchadd.S vfork.S arm_exception.S CMN_CSRCS = arm_assert.c arm_blocktask.c arm_createstack.c arm_vectors.c CMN_CSRCS += arm_exit.c arm_hardfault.c arm_initialize.c arm_initialstate.c @@ -28,8 +27,8 @@ CMN_CSRCS += arm_modifyreg16.c arm_modifyreg32.c arm_releasepending.c CMN_CSRCS += arm_releasestack.c arm_reprioritizertr.c arm_schedulesigaction.c CMN_CSRCS += arm_sigdeliver.c arm_stackframe.c arm_svcall.c arm_systemreset.c CMN_CSRCS += arm_trigger_irq.c arm_unblocktask.c arm_udelay.c arm_usestack.c -CMN_CSRCS += arm_doirq.c arm_vfork.c arm_switchcontext.c arm_puts.c -CMN_CSRCS += arm_tcbinfo.c arm_perf.c +CMN_CSRCS += arm_doirq.c arm_vfork.c arm_switchcontext.c arm_saveusercontext.c +CMN_CSRCS += arm_fullcontextrestore.c arm_puts.c arm_tcbinfo.c arm_perf.c ifeq ($(CONFIG_STM32_TICKLESS_SYSTICK),y) CMN_CSRCS += arm_systick.c diff --git a/arch/arm/src/stm32f0l0g0/Make.defs b/arch/arm/src/stm32f0l0g0/Make.defs index 10b8072fb9..cff2c25c5b 100644 --- a/arch/arm/src/stm32f0l0g0/Make.defs +++ b/arch/arm/src/stm32f0l0g0/Make.defs @@ -18,8 +18,7 @@ # ############################################################################ -CMN_ASRCS = arm_exception.S arm_saveusercontext.S arm_fullcontextrestore.S -CMN_ASRCS += vfork.S +CMN_ASRCS = arm_exception.S vfork.S CMN_CSRCS = arm_allocateheap.c arm_assert.c arm_blocktask.c CMN_CSRCS += arm_createstack.c arm_mdelay.c arm_udelay.c arm_exit.c @@ -29,7 +28,8 @@ CMN_CSRCS += arm_releasepending.c arm_releasestack.c arm_reprioritizertr.c CMN_CSRCS += arm_schedulesigaction.c arm_sigdeliver.c arm_stackframe.c CMN_CSRCS += arm_systemreset.c arm_unblocktask.c arm_usestack.c arm_doirq.c CMN_CSRCS += arm_hardfault.c arm_svcall.c arm_vectors.c arm_vfork.c -CMN_CSRCS += arm_switchcontext.c arm_tcbinfo.c +CMN_CSRCS += arm_switchcontext.c arm_saveusercontext.c arm_fullcontextrestore.c +CMN_CSRCS += arm_tcbinfo.c ifeq ($(CONFIG_BUILD_PROTECTED),y) CMN_CSRCS += arm_task_start.c arm_pthread_start.c diff --git a/arch/arm/src/stm32f7/Make.defs b/arch/arm/src/stm32f7/Make.defs index f5ff1992d6..c4b4151248 100644 --- a/arch/arm/src/stm32f7/Make.defs +++ b/arch/arm/src/stm32f7/Make.defs @@ -23,17 +23,17 @@ # Common ARM and Cortex-M7 files -CMN_ASRCS = arm_saveusercontext.S arm_fullcontextrestore.S -CMN_ASRCS += arm_testset.S arm_fetchadd.S vfork.S arm_exception.S +CMN_ASRCS = arm_testset.S arm_fetchadd.S vfork.S arm_exception.S CMN_CSRCS = arm_assert.c arm_blocktask.c arm_createstack.c arm_vectors.c -CMN_CSRCS += arm_doirq.c arm_exit.c arm_hardfault.c arm_initialize.c +CMN_CSRCS += arm_doirq.c arm_exit.c arm_hardfault.c arm_initialize.c arm_puts.c CMN_CSRCS += arm_initialstate.c arm_interruptcontext.c arm_mdelay.c CMN_CSRCS += arm_memfault.c arm_modifyreg8.c arm_modifyreg16.c arm_modifyreg32.c CMN_CSRCS += arm_releasepending.c arm_releasestack.c arm_reprioritizertr.c CMN_CSRCS += arm_schedulesigaction.c arm_sigdeliver.c arm_stackframe.c CMN_CSRCS += arm_svcall.c arm_systemreset.c arm_trigger_irq.c arm_unblocktask.c -CMN_CSRCS += arm_udelay.c arm_usestack.c arm_vfork.c arm_switchcontext.c arm_puts.c +CMN_CSRCS += arm_udelay.c arm_usestack.c arm_vfork.c arm_switchcontext.c +CMN_CSRCS += arm_saveusercontext.c arm_fullcontextrestore.c CMN_CSRCS += arm_tcbinfo.c arm_cache.c ifeq ($(CONFIG_SCHED_BACKTRACE),y) diff --git a/arch/arm/src/stm32h7/Make.defs b/arch/arm/src/stm32h7/Make.defs index 66ffd09ab1..a3c60902e9 100644 --- a/arch/arm/src/stm32h7/Make.defs +++ b/arch/arm/src/stm32h7/Make.defs @@ -23,18 +23,17 @@ # Common ARM and Cortex-M7 files -CMN_ASRCS = arm_saveusercontext.S arm_fullcontextrestore.S -CMN_ASRCS += arm_testset.S vfork.S arm_exception.S +CMN_ASRCS = arm_testset.S vfork.S arm_exception.S CMN_CSRCS = arm_assert.c arm_blocktask.c arm_createstack.c arm_vectors.c -CMN_CSRCS += arm_doirq.c arm_exit.c arm_hardfault.c arm_initialize.c +CMN_CSRCS += arm_doirq.c arm_exit.c arm_hardfault.c arm_initialize.c CMN_CSRCS += arm_initialstate.c arm_interruptcontext.c arm_mdelay.c arm_memfault.c CMN_CSRCS += arm_modifyreg8.c arm_modifyreg16.c arm_modifyreg32.c CMN_CSRCS += arm_releasepending.c arm_releasestack.c arm_reprioritizertr.c CMN_CSRCS += arm_schedulesigaction.c arm_sigdeliver.c arm_stackframe.c arm_svcall.c CMN_CSRCS += arm_systemreset.c arm_trigger_irq.c arm_udelay.c arm_unblocktask.c -CMN_CSRCS += arm_usestack.c arm_vfork.c arm_switchcontext.c arm_puts.c -CMN_CSRCS += arm_tcbinfo.c arm_cache.c arm_perf.c +CMN_CSRCS += arm_usestack.c arm_vfork.c arm_switchcontext.c arm_saveusercontext.c +CMN_CSRCS += arm_fullcontextrestore.c arm_puts.c arm_tcbinfo.c arm_cache.c arm_perf.c ifeq ($(CONFIG_ARMV7M_SYSTICK),y) CMN_CSRCS += arm_systick.c diff --git a/arch/arm/src/stm32l4/Make.defs b/arch/arm/src/stm32l4/Make.defs index db915f72b9..de0a07eceb 100644 --- a/arch/arm/src/stm32l4/Make.defs +++ b/arch/arm/src/stm32l4/Make.defs @@ -23,8 +23,7 @@ # Common ARM and Cortex-M4 files (copied from stm32/Make.defs) -CMN_ASRCS = arm_saveusercontext.S arm_fullcontextrestore.S -CMN_ASRCS += arm_testset.S arm_fetchadd.S vfork.S arm_exception.S +CMN_ASRCS = arm_testset.S arm_fetchadd.S vfork.S arm_exception.S CMN_CSRCS = arm_assert.c arm_blocktask.c arm_createstack.c CMN_CSRCS += arm_doirq.c arm_exit.c arm_hardfault.c arm_initialize.c @@ -34,7 +33,8 @@ CMN_CSRCS += arm_releasepending.c arm_releasestack.c arm_reprioritizertr.c CMN_CSRCS += arm_schedulesigaction.c arm_sigdeliver.c arm_stackframe.c CMN_CSRCS += arm_svcall.c arm_systemreset.c arm_trigger_irq.c arm_udelay.c CMN_CSRCS += arm_unblocktask.c arm_usestack.c arm_vfork.c arm_switchcontext.c -CMN_CSRCS += arm_puts.c arm_tcbinfo.c arm_vectors.c +CMN_CSRCS += arm_saveusercontext.c arm_fullcontextrestore.c arm_puts.c +CMN_CSRCS += arm_tcbinfo.c arm_vectors.c # Configuration-dependent common files diff --git a/arch/arm/src/stm32l5/Make.defs b/arch/arm/src/stm32l5/Make.defs index 5b22df68fb..d1da0d7d0c 100644 --- a/arch/arm/src/stm32l5/Make.defs +++ b/arch/arm/src/stm32l5/Make.defs @@ -25,11 +25,7 @@ HEAD_ASRC = # Common ARM and Cortex-M4 files (copied from stm32/Make.defs) -CMN_UASRCS = -CMN_UCSRCS = - -CMN_ASRCS = arm_saveusercontext.S arm_fullcontextrestore.S -CMN_ASRCS += arm_testset.S arm_fetchadd.S vfork.S arm_exception.S +CMN_ASRCS = arm_testset.S arm_fetchadd.S vfork.S arm_exception.S CMN_CSRCS = arm_assert.c arm_blocktask.c arm_createstack.c arm_vectors.c CMN_CSRCS += arm_doirq.c arm_exit.c arm_hardfault.c arm_initialize.c @@ -39,7 +35,7 @@ CMN_CSRCS += arm_releasepending.c arm_releasestack.c arm_reprioritizertr.c CMN_CSRCS += arm_schedulesigaction.c arm_sigdeliver.c arm_stackframe.c CMN_CSRCS += arm_svcall.c arm_systemreset.c arm_trigger_irq.c arm_udelay.c CMN_CSRCS += arm_unblocktask.c arm_usestack.c arm_vfork.c arm_switchcontext.c -CMN_CSRCS += arm_puts.c arm_tcbinfo.c +CMN_CSRCS += arm_saveusercontext.c arm_fullcontextrestore.c arm_puts.c arm_tcbinfo.c # Configuration-dependent common files diff --git a/arch/arm/src/stm32u5/Make.defs b/arch/arm/src/stm32u5/Make.defs index e06b1231ce..619f0495f9 100644 --- a/arch/arm/src/stm32u5/Make.defs +++ b/arch/arm/src/stm32u5/Make.defs @@ -25,11 +25,7 @@ HEAD_ASRC = # Common ARM and Cortex-M4 files (copied from stm32/Make.defs) -CMN_UASRCS = -CMN_UCSRCS = - -CMN_ASRCS = arm_saveusercontext.S arm_fullcontextrestore.S -CMN_ASRCS += arm_testset.S arm_fetchadd.S vfork.S arm_exception.S +CMN_ASRCS = arm_testset.S arm_fetchadd.S vfork.S arm_exception.S CMN_CSRCS = arm_assert.c arm_blocktask.c arm_createstack.c arm_vectors.c CMN_CSRCS += arm_doirq.c arm_exit.c arm_hardfault.c arm_initialize.c @@ -39,7 +35,7 @@ CMN_CSRCS += arm_releasepending.c arm_releasestack.c arm_reprioritizertr.c CMN_CSRCS += arm_schedulesigaction.c arm_sigdeliver.c arm_stackframe.c CMN_CSRCS += arm_svcall.c arm_switchcontext.c arm_systemreset.c arm_tcbinfo.c CMN_CSRCS += arm_trigger_irq.c arm_udelay.c arm_unblocktask.c arm_usestack.c -CMN_CSRCS += arm_vfork.c +CMN_CSRCS += arm_vfork.c arm_saveusercontext.c arm_fullcontextrestore.c # Configuration-dependent common files diff --git a/arch/arm/src/str71x/Make.defs b/arch/arm/src/str71x/Make.defs index 29dacbc5d4..4503799528 100644 --- a/arch/arm/src/str71x/Make.defs +++ b/arch/arm/src/str71x/Make.defs @@ -20,8 +20,7 @@ HEAD_ASRC = str71x_head.S -CMN_ASRCS = arm_saveusercontext.S arm_fullcontextrestore.S arm_vectors.S -CMN_ASRCS += vfork.S +CMN_ASRCS = arm_vectors.S vfork.S CMN_CSRCS = arm_allocateheap.c arm_assert.c arm_blocktask.c CMN_CSRCS += arm_createstack.c arm_dataabort.c arm_mdelay.c arm_udelay.c @@ -30,8 +29,8 @@ CMN_CSRCS += arm_interruptcontext.c arm_prefetchabort.c arm_releasepending.c CMN_CSRCS += arm_releasestack.c arm_reprioritizertr.c arm_stackframe.c CMN_CSRCS += arm_syscall.c arm_unblocktask.c arm_undefinedinsn.c arm_usestack.c CMN_CSRCS += arm_schedulesigaction.c arm_sigdeliver.c -CMN_CSRCS += arm_lowputs.c arm_vfork.c arm_puts.c arm_tcbinfo.c -CMN_CSRCS += arm_switchcontext.c +CMN_CSRCS += arm_lowputs.c arm_vfork.c arm_switchcontext.c arm_saveusercontext.c +CMN_CSRCS += arm_fullcontextrestore.c arm_puts.c arm_tcbinfo.c ifneq ($(CONFIG_ARCH_IDLE_CUSTOM),y) CMN_CSRCS += arm_idle.c diff --git a/arch/arm/src/tiva/Make.defs b/arch/arm/src/tiva/Make.defs index 4d6f92e033..3f18bb62f9 100644 --- a/arch/arm/src/tiva/Make.defs +++ b/arch/arm/src/tiva/Make.defs @@ -18,8 +18,7 @@ # ############################################################################ -CMN_ASRCS = arm_saveusercontext.S arm_fullcontextrestore.S -CMN_ASRCS += arm_testset.S arm_fetchadd.S vfork.S arm_exception.S +CMN_ASRCS = arm_testset.S arm_fetchadd.S vfork.S arm_exception.S CMN_CSRCS = arm_assert.c arm_blocktask.c arm_createstack.c CMN_CSRCS += arm_doirq.c arm_exit.c arm_hardfault.c arm_initialize.c @@ -28,8 +27,8 @@ CMN_CSRCS += arm_memfault.c arm_modifyreg8.c arm_modifyreg16.c arm_modifyreg32.c CMN_CSRCS += arm_releasepending.c arm_releasestack.c arm_reprioritizertr.c CMN_CSRCS += arm_schedulesigaction.c arm_sigdeliver.c arm_stackframe.c CMN_CSRCS += arm_svcall.c arm_trigger_irq.c arm_unblocktask.c arm_udelay.c -CMN_CSRCS += arm_usestack.c arm_vfork.c arm_switchcontext.c arm_puts.c -CMN_CSRCS += arm_tcbinfo.c arm_vectors.c +CMN_CSRCS += arm_usestack.c arm_vfork.c arm_switchcontext.c arm_saveusercontext.c +CMN_CSRCS += arm_fullcontextrestore.c arm_puts.c arm_tcbinfo.c arm_vectors.c ifeq ($(CONFIG_ARM_SEMIHOSTING_HOSTFS),y) CMN_CSRCS += arm_hostfs.c diff --git a/arch/arm/src/tms570/Make.defs b/arch/arm/src/tms570/Make.defs index 60f4177172..74e9907b55 100644 --- a/arch/arm/src/tms570/Make.defs +++ b/arch/arm/src/tms570/Make.defs @@ -25,9 +25,8 @@ HEAD_ASRC = arm_vectortab.S # Common assembly language files -CMN_ASRCS += arm_vectortab.S arm_vectors.S arm_head.S arm_fullcontextrestore.S -CMN_ASRCS += arm_saveusercontext.S arm_vectoraddrexcptn.S -CMN_ASRCS += arm_testset.S arm_fetchadd.S vfork.S +CMN_ASRCS += arm_vectortab.S arm_vectors.S arm_head.S +CMN_ASRCS += arm_vectoraddrexcptn.S arm_testset.S arm_fetchadd.S vfork.S CMN_ASRCS += cp15_coherent_dcache.S cp15_invalidate_dcache.S CMN_ASRCS += cp15_clean_dcache.S cp15_flush_dcache.S CMN_ASRCS += cp15_clean_dcache_all.S cp15_flush_dcache_all.S @@ -50,8 +49,8 @@ CMN_CSRCS += arm_assert.c arm_blocktask.c arm_dataabort.c CMN_CSRCS += arm_doirq.c arm_initialstate.c arm_prefetchabort.c CMN_CSRCS += arm_releasepending.c arm_reprioritizertr.c CMN_CSRCS += arm_schedulesigaction.c arm_sigdeliver.c arm_syscall.c -CMN_CSRCS += arm_unblocktask.c arm_undefinedinsn.c -CMN_CSRCS += arm_switchcontext.c arm_cache.c +CMN_CSRCS += arm_unblocktask.c arm_undefinedinsn.c arm_switchcontext.c +CMN_CSRCS += arm_saveusercontext.c arm_fullcontextrestore.c arm_cache.c # Configuration dependent C files diff --git a/arch/arm/src/xmc4/Make.defs b/arch/arm/src/xmc4/Make.defs index 2bab5610dd..accb1c38d7 100644 --- a/arch/arm/src/xmc4/Make.defs +++ b/arch/arm/src/xmc4/Make.defs @@ -18,8 +18,7 @@ # ############################################################################ -CMN_ASRCS = arm_saveusercontext.S arm_fullcontextrestore.S -CMN_ASRCS += arm_testset.S arm_fetchadd.S vfork.S arm_exception.S +CMN_ASRCS = arm_testset.S arm_fetchadd.S vfork.S arm_exception.S CMN_CSRCS = arm_assert.c arm_blocktask.c arm_createstack.c arm_vectors.c CMN_CSRCS += arm_doirq.c arm_exit.c arm_initialize.c arm_initialstate.c @@ -28,7 +27,8 @@ CMN_CSRCS += arm_modifyreg8.c arm_modifyreg16.c arm_modifyreg32.c CMN_CSRCS += arm_releasestack.c arm_reprioritizertr.c arm_schedulesigaction.c CMN_CSRCS += arm_releasepending.c arm_sigdeliver.c arm_stackframe.c arm_svcall.c CMN_CSRCS += arm_systemreset.c arm_udelay.c arm_unblocktask.c arm_usestack.c -CMN_CSRCS += arm_vfork.c arm_switchcontext.c arm_puts.c arm_tcbinfo.c +CMN_CSRCS += arm_vfork.c arm_switchcontext.c arm_saveusercontext.c +CMN_CSRCS += arm_fullcontextrestore.c arm_puts.c arm_tcbinfo.c ifeq ($(CONFIG_SCHED_BACKTRACE),y) CMN_CSRCS += arm_backtrace_thumb.c