You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by GitBox <gi...@apache.org> on 2021/10/13 09:47:23 UTC

[GitHub] [mynewt-core] kasjer opened a new pull request #2694: kernel/arch/m33: Update context switch for TrustZone

kasjer opened a new pull request #2694:
URL: https://github.com/apache/mynewt-core/pull/2694


   When build with hardware floating point enabled, context
   switch code had hard-coded LR value that were correct
   for code running without TrustZone or with TrustZone
   present but code running in secure mode.
   
   LR modification during task switch only needs to have
   FType bit set correctly (1 when there are no floating
   point registers on stack, 0 when FP registers are there).
   Other bits from link register should stay unchanged
   to be correctly handled in TrustZone environment.
   
   This saves only FType bit from LR during context switch store
   phase, during restore phase bit FType from saved context is
   set to LR. This way there is no need to
   hard-code other possible values that LR can have.
   
   As side effect LR[FType] is placed at very bottom of stack_frame
   to keep code size unchanged.
   LDMIA and STMDB are used with R0 instead of LR hence
   register placement change.


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@mynewt.apache.org

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



[GitHub] [mynewt-core] kasjer merged pull request #2694: kernel/arch/m33: Update context switch for TrustZone

Posted by GitBox <gi...@apache.org>.
kasjer merged pull request #2694:
URL: https://github.com/apache/mynewt-core/pull/2694


   


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@mynewt.apache.org

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