Lines Matching full:object
15 static int find_qtee_object(struct qcomtee_object **object, unsigned long id, in find_qtee_object() argument
21 /* Object release is RCU protected. */ in find_qtee_object()
22 *object = idr_find(&ctxdata->qtee_objects_idr, id); in find_qtee_object()
23 if (!qcomtee_object_get(*object)) in find_qtee_object()
32 struct qcomtee_object *object; in del_qtee_object() local
35 object = idr_remove(&ctxdata->qtee_objects_idr, id); in del_qtee_object()
37 qcomtee_object_put(object); in del_qtee_object()
41 * qcomtee_context_add_qtee_object() - Add a QTEE object to the context.
42 * @param: TEE parameter representing @object.
43 * @object: QTEE object.
44 * @ctx: context to add the object.
46 * It assumes @object is %QCOMTEE_OBJECT_TYPE_TEE and the caller has already
47 * issued qcomtee_object_get() for @object.
52 struct qcomtee_object *object, in qcomtee_context_add_qtee_object() argument
59 ret = idr_alloc(&ctxdata->qtee_objects_idr, object, 0, 0, in qcomtee_context_add_qtee_object()
65 /* QTEE Object: QCOMTEE_OBJREF_FLAG_TEE set. */ in qcomtee_context_add_qtee_object()
71 /* Retrieve the QTEE object added with qcomtee_context_add_qtee_object(). */
72 int qcomtee_context_find_qtee_object(struct qcomtee_object **object, in qcomtee_context_find_qtee_object() argument
78 return find_qtee_object(object, param->u.objref.id, ctxdata); in qcomtee_context_find_qtee_object()
82 * qcomtee_context_del_qtee_object() - Delete a QTEE object from the context.
83 * @param: TEE parameter representing @object.
84 * @ctx: context for deleting the object.
105 * &enum qcomtee_arg_type value. It gets the object's refcount in @arg;
116 /* param is a NULL object: */ in qcomtee_objref_to_arg()
120 /* param is a callback object: */ in qcomtee_objref_to_arg()
123 /* param is a QTEE object: */ in qcomtee_objref_to_arg()
126 /* param is a memory object: */ in qcomtee_objref_to_arg()
135 * - For direct object invocations, the matching put is called in in qcomtee_objref_to_arg()
162 struct qcomtee_object *object = arg->o; in qcomtee_objref_from_arg() local
164 switch (typeof_qcomtee_object(object)) { in qcomtee_objref_from_arg()
170 /* object is a callback object: */ in qcomtee_objref_from_arg()
171 if (is_qcomtee_user_object(object)) in qcomtee_objref_from_arg()
172 return qcomtee_user_param_from_object(param, object, in qcomtee_objref_from_arg()
174 /* object is a memory object: */ in qcomtee_objref_from_arg()
175 else if (is_qcomtee_memobj_object(object)) in qcomtee_objref_from_arg()
176 return qcomtee_memobj_param_from_object(param, object, in qcomtee_objref_from_arg()
181 return qcomtee_context_add_qtee_object(param, object, ctx); in qcomtee_objref_from_arg()
371 * by passing a credential object as input OBJREF. TEE_OBJREF_NULL as a in qcomtee_root_object_check()
372 * credential object represents a privileged client for QTEE and in qcomtee_root_object_check()
387 * qcomtee_object_invoke() - Invoke a QTEE object.
390 * @params: parameters for the object.
401 struct qcomtee_object *object; in qcomtee_object_invoke() local
414 /* Otherwise, invoke a QTEE object: */ in qcomtee_object_invoke()
424 /* Get an object to invoke. */ in qcomtee_object_invoke()
430 object = ROOT_QCOMTEE_OBJECT; in qcomtee_object_invoke()
431 } else if (find_qtee_object(&object, arg->id, ctxdata)) { in qcomtee_object_invoke()
439 ret = qcomtee_object_do_invoke(oic, object, arg->op, u, &result); in qcomtee_object_invoke()
449 /* Prase QTEE response and put driver's object copies: */ in qcomtee_object_invoke()
468 qcomtee_object_put(object); in qcomtee_object_invoke()
476 * @op: requested operation on the object.
483 * On output, the object ID and request ID are stored in the meta parameter.
582 * closed by teedev_ctx_put() in object's release(). in qcomtee_open()
603 struct qcomtee_object *object; in qcomtee_close_context() local
609 idr_for_each_entry(&ctxdata->qtee_objects_idr, object, id) in qcomtee_close_context()
610 qcomtee_object_put(object); in qcomtee_close_context()
661 /* Get ''FeatureVersions Service'' object. */ in qcomtee_get_qtee_feature_list()
753 /* Init Object table. */ in qcomtee_probe()
787 * QTEE does not provide an API to inform it about a callback object going away.
788 * However, when releasing QTEE objects, any callback object sent to QTEE
789 * previously would be released by QTEE as part of the object release.