xiaoxiang781216 commented on PR #16356:
URL: https://github.com/apache/nuttx/pull/16356#issuecomment-2869396800

   >     2. Fixes compatibility with [upstream OP-TEE 
OS](https://github.com/OP-TEE/optee_os/) when using temporary memory
   >        
   >        * Previous implementation of temporary (i.e. non-registered) memory 
would use registered memory references (`*_RMEM_*`) instead of temporary 
(`*_TMEM_*`) when communicating with the trusted OS. This was to support the 
open-vela framework which runs a customised OP-TEE OS to this end (see 
[here](https://github.com/open-vela/external_optee_optee_os/blob/1a29df42707226a8b879bec42cfad1e23a43bf3c/core/tee/entry_std.c#L160)
 and 
[here](https://github.com/open-vela/frameworks_security_optee_vela/blob/54b377d5c1ad2b0f0a9fb45460b23d666666efa9/compat/mobj_dyn_shm.c#L25)).
 This made the previous implementation incompatible with any other instance of 
OP-TEE OS including upstream. That behaviour is now wrapped around 
`CONFIG_OPTEE_OPENVELA_COMPAT` which is enabled by default for socket 
transports (expected users of open-vela), retaining existing behaviour. 
`CONFIG_OPTEE_OPENVELA_COMPAT` is not enabled by default for the SMC transport, 
in which case normal handling of temporary memory r
 eferences is implemented.
   >
   
   @hujun260 please look at this and remove the incompatibility from open vela 
tee-os implementation.
    
   >     * NuttX configs `imx93-evk:nsh` and `imx93-evk:knsh` with additional 
config:
   >       ```
   >       CONFIG_ALLOW_BSD_COMPONENTS=y
   >       CONFIG_ARCH_VMA_MAPPING=y
   >       CONFIG_ARCH_SHM_NPAGES=4096
   >       CONFIG_ARCH_SHM_VBASE=0xFF000000
   >       CONFIG_DEV_OPTEE_SMC=y
   >       CONFIG_EXAMPLES_OPTEE=y
   >       CONFIG_EXAMPLES_OPTEE_GP=y
   >       CONFIG_FS_SHMFS=y
   >       CONFIG_LIBC_MEMFD_SHMFS=y
   >       CONFIG_LIBTEEC=y
   >       ```
   > 
   
   let's create new defconfig to new optee instead modifying the current one, 
so ci could ensure that the new change don't break your work.


-- 
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-unsubscr...@nuttx.apache.org

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

Reply via email to