Lines Matching full:h
4 #include <ta_avb.h>
5 #include <tee_internal_api.h>
6 #include <tee_internal_api_extensions.h>
8 #include <string.h>
25 static TEE_Result create_rb_state(uint32_t lock_state, TEE_ObjectHandle *h) in create_rb_state() argument
33 &lock_state, sizeof(lock_state), h); in create_rb_state()
37 TEE_ObjectHandle *h) in open_rb_state() argument
44 sizeof(rb_obj_name), flags, h); in open_rb_state()
48 return create_rb_state(default_lock_state, h); in open_rb_state()
82 TEE_ObjectHandle h; in read_rb_idx() local
91 res = open_rb_state(DEFAULT_LOCK_STATE, &h); in read_rb_idx()
95 res = TEE_SeekObjectData(h, slot_offset, TEE_DATA_SEEK_SET); in read_rb_idx()
99 res = TEE_ReadObjectData(h, &idx, sizeof(idx), &count); in read_rb_idx()
110 res = TEE_SeekObjectData(h, slot_offset, in read_rb_idx()
114 res = TEE_WriteObjectData(h, &idx, sizeof(idx)); in read_rb_idx()
123 TEE_CloseObject(h); in read_rb_idx()
138 TEE_ObjectHandle h; in write_rb_idx() local
148 res = open_rb_state(DEFAULT_LOCK_STATE, &h); in write_rb_idx()
152 res = TEE_SeekObjectData(h, slot_offset, TEE_DATA_SEEK_SET); in write_rb_idx()
156 res = TEE_ReadObjectData(h, &idx, sizeof(idx), &count); in write_rb_idx()
167 res = TEE_SeekObjectData(h, slot_offset, TEE_DATA_SEEK_SET); in write_rb_idx()
171 res = TEE_WriteObjectData(h, &widx, sizeof(widx)); in write_rb_idx()
173 TEE_CloseObject(h); in write_rb_idx()
186 TEE_ObjectHandle h; in read_lock_state() local
191 res = open_rb_state(DEFAULT_LOCK_STATE, &h); in read_lock_state()
195 res = TEE_ReadObjectData(h, &lock_state, sizeof(lock_state), &count); in read_lock_state()
209 TEE_CloseObject(h); in read_lock_state()
224 TEE_ObjectHandle h; in write_lock_state() local
231 res = open_rb_state(wlock_state, &h); in write_lock_state()
235 res = TEE_ReadObjectData(h, &lock_state, sizeof(lock_state), &count); in write_lock_state()
241 res = TEE_SeekObjectData(h, 0, TEE_DATA_SEEK_SET); in write_lock_state()
245 res = TEE_WriteObjectData(h, &wlock_state, sizeof(wlock_state)); in write_lock_state()
247 TEE_CloseObject(h); in write_lock_state()
262 TEE_ObjectHandle h = TEE_HANDLE_NULL; in write_persist_value() local
290 value_sz, &h); in write_persist_value()
294 TEE_CloseObject(h); in write_persist_value()
311 TEE_ObjectHandle h = TEE_HANDLE_NULL; in read_persist_value() local
336 name_full_sz, flags, &h); in read_persist_value()
342 res = TEE_ReadObjectData(h, value, value_sz, &count); in read_persist_value()
353 TEE_CloseObject(h); in read_persist_value()