gneworld commented on PR #12965:
URL: https://github.com/apache/nuttx/pull/12965#issuecomment-2309391246

   > This change is not correct for nrf91. You can't ignore `tz_nonsecure_call` 
attribute when switching from secure to non-secure environment is required 
(`CONFIG_NRF91_NONSECURE_BOOT=y`). Non-secure call must be done with 
`__gnu_cmse_nonsecure_call`. Here is correct assembler:
   > 
   > ```
   >   ns_reset();
   >     8d8e:       6864            ldr     r4, [r4, #4]
   >     8d90:       0864            lsrs    r4, r4, #1
   >     8d92:       0064            lsls    r4, r4, #1
   >     8d94:       4620            mov     r0, r4
   >     8d96:       4621            mov     r1, r4
   >     8d98:       4622            mov     r2, r4
   >     8d9a:       4623            mov     r3, r4
   >     8d9c:       f000 f858       bl      8e50 <__gnu_cmse_nonsecure_call>
   > ```
   > 
   > With your change it is:
   > 
   > ```
   >   __asm__ __volatile__("\tmsr msp_ns, %0\n"
   >     8d8e:       e9d5 3200       ldrd    r3, r2, [r5]
   >     8d92:       f383 8888       msr     MSP_NS, r3
   >     8d96:       f3bf 8f6f       isb     sy
   >     8d9a:       4697            mov     pc, r2
   > ```
   
   I have dropped the modification  int case of  CONFIG_NRF91_NONSECURE_BOOT  
for nrf91, thanks a lot


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to