Calling a user defined secure world fuction within the secure world

Hello,

I’m trying to call a defined function within my ta example. I’m currently using the secure storage ta. So i realized that the fuction can be called through the TA_invokecommandentrypoint i can call it within my file. I know it takes in a tee_params and a arg type. I was able to pass in the argument type just fine. Now i have a problem with passing in the tee params.

    call_params[0].tmpref.buffer = "userpass";
        call_params[0].tmpref.size = strlen("userpass");

        call_params[1].tmpref.buffer = data;
        call.params[1].tmpref.size = data_len;

read_raw_object( call_param_types, call_params); 

this is how i’m trying to call it but i get this error message:

secure_storage_ta.c:279:16: error: 'TEE_Param' has no member named 'tmpref'
  call_params[1].tmpref.buffer = data;
            ^

yet i know i have to specify the buffer and size due to how the structure is defined.

typedef union
		
{
		
		
   struct
		
   {
		
      void*    buffer;
     size_t   size;
		
   } memref;
		
		
   struct 		
   {
		
      uint32_t a;	
      uint32_t b;    		
   } value;

}

TEE_Param;

Again, for all OP-TEE related questions, please post to https://github.com/OP-TEE/optee_os/issues/new.

As you can see in the TEE_Param union in the TA, there’s no member named tmpref, only memref. tmpref is on the CA side, e.g. TEEC_Operation op; op.params[0].tmpref.buffer = foo;. Are you confusing the CA side with the TA?