You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2020/12/04 14:50:37 UTC

[GitHub] [incubator-nuttx] patacongo opened a new issue #2478: RISC-V setjmp.S is in wrong directory.

patacongo opened a new issue #2478:
URL: https://github.com/apache/incubator-nuttx/issues/2478


   PR #2470 introduced RISC-V generial setjmp/longjmp for RISC-V.  Unfortunately the file  arch/risc-v/src/common/riscv_setjmp.S was place in the incorrect location.
   
   Application code many not call directly into any code position in the kernal address space.  Violating this architectural principle does not matter very much in the FLAT build but precludes other build modes such as PROTECTED and KERNEL modes.
   
   libs/ is the correct location for code that can be shared between user applications and OS code.  Specific, setjmp.S must be moved to libs/libc/machine/risc-v.
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] btashton commented on issue #2478: RISC-V setjmp.S is in wrong directory.

Posted by GitBox <gi...@apache.org>.
btashton commented on issue #2478:
URL: https://github.com/apache/incubator-nuttx/issues/2478#issuecomment-738911174


   I started making this fix, and had a couple questions.
   
   It looks like we also remove these from all the `arch/arm/<chip>/Make.defs` as this will come in via libs now?  Is there anything special that needs to happen here?
   ```
   ifeq ($(CONFIG_ARCH_SETJMP_H),y)
   ifeq ($(CONFIG_ARCH_TOOLCHAIN_GNU),y)
   CMN_ASRCS += arm_setjmp.S
   endif
   endif
   ```
   
   `arch/sim/src/sim/up_setjmp_arm.S`  -- Why is this here?  I would not expect arm specific code in the sim.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] xiaoxiang781216 commented on issue #2478: setjmp.S is in wrong directory (Arm, sim, RISC-V)

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on issue #2478:
URL: https://github.com/apache/incubator-nuttx/issues/2478#issuecomment-813094179


   Note: the function name on sim is up_setjmp/up_longjmp, so should we rename them to setjmp/longjmp?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] patacongo commented on issue #2478: RISC-V setjmp.S is in wrong directory.

Posted by GitBox <gi...@apache.org>.
patacongo commented on issue #2478:
URL: https://github.com/apache/incubator-nuttx/issues/2478#issuecomment-738891131


   Also noted by @xiaoxiang781216 
   
       arch/arm/src/armv7-m/gnu/arm_setjmp.S
       arch/arm/src/armv8-m/arm_setjmp.S
       arch/sim/src/sim/up_setjmp32.S
       arch/sim/src/sim/up_setjmp64.S
       arch/sim/src/sim/up_setjmp_arm.S


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] btashton closed issue #2478: setjmp.S is in wrong directory (Arm, sim, RISC-V)

Posted by GitBox <gi...@apache.org>.
btashton closed issue #2478:
URL: https://github.com/apache/incubator-nuttx/issues/2478


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] patacongo commented on issue #2478: setjmp.S is in wrong directory (Arm, sim, RISC-V)

Posted by GitBox <gi...@apache.org>.
patacongo commented on issue #2478:
URL: https://github.com/apache/incubator-nuttx/issues/2478#issuecomment-738921317


   
   > It looks like we also remove these from all the 
   > |arch/arm/<chip>/Make.defs| as this will come in via libs now? Is 
   > there anything special that needs to happen here?
   >
   > |ifeq ($(CONFIG_ARCH_SETJMP_H),y) ifeq 
   > ($(CONFIG_ARCH_TOOLCHAIN_GNU),y) CMN_ASRCS += arm_setjmp.S endif endif|
   |For ARMv7-M, there are separate .S file for GCC and IAR.  The two 
   assemblers use different syntax.|
   > |arch/sim/src/sim/up_setjmp_arm.S| -- Why is this here? I would not 
   > expect arm specific code in the sim. 
   The newer MACs will use ARM M1 for the simulator.  Perhaps that is why 
   this is there??? Or perhaps for Linux on an ARM platform?
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] btashton commented on issue #2478: setjmp.S is in wrong directory (Arm, sim, RISC-V)

Posted by GitBox <gi...@apache.org>.
btashton commented on issue #2478:
URL: https://github.com/apache/incubator-nuttx/issues/2478#issuecomment-813116341


   @xiaoxiang781216  I think we should address the sim stuff in another pr.  The naming prefix of a lot of the sim stuff is not correct, and we should probably just track that all as one fix.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org