Core: Update parameter packing mechanism

The existing parameter packing mechanism wrappers the vectors and
length into the new defined structure, and marks the 'out_vec' as
input is confusing. Move the type and length into a new defined
'control' parameter to clear the confusion. And this could be expanded
easily to welcome more extra parameters.

Change-Id: Id63f4c48af90231480a3238570b0c1956a2918d8
Signed-off-by: Summer Qin <summer.qin@arm.com>
diff --git a/interface/src/tfm_psa_ns_api.c b/interface/src/tfm_psa_ns_api.c
index 5fb5de3..9a677a2 100644
--- a/interface/src/tfm_psa_ns_api.c
+++ b/interface/src/tfm_psa_ns_api.c
@@ -54,18 +54,18 @@
     /* Due to v8M restrictions, TF-M NS API needs to add another layer of
      * serialization in order for NS to pass arguments to S
      */
-    psa_invec in_vecs, out_vecs;
+    const struct tfm_control_parameter_t ctrl_param = {
+        .type = type,
+        .in_len = in_len,
+        .out_len = out_len,
+    };
 
-    in_vecs.base = in_vec;
-    in_vecs.len = in_len;
-    out_vecs.base = out_vec;
-    out_vecs.len = out_len;
     return tfm_ns_interface_dispatch(
                                 (veneer_fn)tfm_psa_call_veneer,
                                 (uint32_t)handle,
-                                (uint32_t)type,
-                                (uint32_t)&in_vecs,
-                                (uint32_t)&out_vecs);
+                                (uint32_t)&ctrl_param,
+                                (uint32_t)in_vec,
+                                (uint32_t)out_vec);
 }
 
 void psa_close(psa_handle_t handle)