Home
last modified time | relevance | path

Searched refs:obj (Results 1 – 25 of 28) sorted by relevance

12

/trusty/kernel/include/shared/lk/
Dreflist.h35 struct obj { struct
39 typedef void (*obj_destroy_func)(struct obj* obj); argument
52 static inline __ALWAYS_INLINE void obj_init(struct obj* obj, in obj_init() argument
54 list_initialize(&obj->ref_list); in obj_init()
55 list_add_tail(&obj->ref_list, &ref->ref_node); in obj_init()
58 static inline __ALWAYS_INLINE bool obj_has_ref(struct obj* obj) { in obj_has_ref() argument
59 return !list_is_empty(&obj->ref_list); in obj_has_ref()
62 static inline __ALWAYS_INLINE bool obj_has_only_ref(struct obj* obj, in obj_has_only_ref() argument
64 assert(obj_has_ref(obj)); in obj_has_only_ref()
66 struct list_node* head = list_peek_head(&obj->ref_list); in obj_has_only_ref()
[all …]
/trusty/kernel/lib/sm/
Dshared_mem.c49 struct ext_mem_obj* obj = containerof(vmm_obj, struct ext_mem_obj, vmm_obj); in sm_mem_obj_compat_destroy() local
50 free(obj); in sm_mem_obj_compat_destroy()
78 struct ext_mem_obj* obj; in sm_mem_compat_get_vmm_obj() local
99 obj = malloc(sizeof(*obj) + ext_mem_obj_page_runs_size(1)); in sm_mem_compat_get_vmm_obj()
100 if (!obj) { in sm_mem_compat_get_vmm_obj()
105 ext_mem_obj_initialize(obj, obj_ref, mem_obj_id, 0, &sm_mem_obj_compat_ops, in sm_mem_compat_get_vmm_obj()
107 obj->page_runs[0].paddr = paddr; in sm_mem_compat_get_vmm_obj()
108 obj->page_runs[0].size = size; in sm_mem_compat_get_vmm_obj()
109 *objp = &obj->vmm_obj; in sm_mem_compat_get_vmm_obj()
123 struct sm_mem_obj* obj = in sm_mem_obj_destroy() local
[all …]
/trusty/kernel/lib/extmem/
Dexternal_memory.c48 void ext_mem_obj_initialize(struct ext_mem_obj* obj, in ext_mem_obj_initialize() argument
55 obj->id = id; in ext_mem_obj_initialize()
56 obj->tag = tag; in ext_mem_obj_initialize()
57 obj->match_tag = 0; in ext_mem_obj_initialize()
58 obj->vmm_obj.ops = ops; in ext_mem_obj_initialize()
59 obj->arch_mmu_flags = arch_mmu_flags; in ext_mem_obj_initialize()
60 obj->page_run_count = page_run_count; in ext_mem_obj_initialize()
61 obj_init(&obj->vmm_obj.obj, ref); in ext_mem_obj_initialize()
62 bst_node_initialize(&obj->node); in ext_mem_obj_initialize()
65 bool ext_mem_insert(struct bst_root* objs, struct ext_mem_obj* obj) { in ext_mem_insert() argument
[all …]
/trusty/kernel/lib/trusty/
Dvqueue.c248 static void vqueue_mem_obj_initialize(struct vqueue_mem_obj* obj, in vqueue_mem_obj_initialize() argument
253 obj->client_id = client_id; in vqueue_mem_obj_initialize()
254 obj->id = id; in vqueue_mem_obj_initialize()
255 obj->iov_base = iov_base; in vqueue_mem_obj_initialize()
256 obj->size = size; in vqueue_mem_obj_initialize()
257 bst_node_initialize(&obj->node); in vqueue_mem_obj_initialize()
261 struct vqueue_mem_obj* obj) { in vqueue_mem_insert() argument
262 return bst_insert(objs, &obj->node, vqueue_mem_obj_cmp); in vqueue_mem_insert()
274 struct vqueue_mem_obj* obj) { in vqueue_mem_delete() argument
275 bst_delete(objs, &obj->node); in vqueue_mem_delete()
[all …]
Dmemref.c112 rc = vmm_alloc_obj(app->aspace, "memref", memref->slice.obj, in memref_mmap()
156 rc = slice->obj->ops->check_flags(slice->obj, &arch_mmu_flags); in check_slice()
165 status_t memref_create_from_vmm_obj(struct vmm_obj *obj, in memref_create_from_vmm_obj() argument
170 DEBUG_ASSERT(obj); in memref_create_from_vmm_obj()
177 vmm_obj_slice_bind(&memref->slice, obj, offset, size); in memref_create_from_vmm_obj()
232 return containerof(handle, struct memref, handle)->slice.obj; in memref_handle_to_vmm_obj()
Dtipc_virtio_dev.c193 static int tipc_ext_mem_check_flags(struct vmm_obj* obj, uint* arch_mmu_flags) { in tipc_ext_mem_check_flags() argument
194 struct tipc_ext_mem* tem = containerof(obj, struct tipc_ext_mem, vmm_obj); in tipc_ext_mem_check_flags()
198 static int tipc_ext_mem_get_page(struct vmm_obj* obj, in tipc_ext_mem_get_page() argument
202 struct tipc_ext_mem* tem = containerof(obj, struct tipc_ext_mem, vmm_obj); in tipc_ext_mem_get_page()
208 void tipc_ext_mem_destroy(struct vmm_obj* obj) { in tipc_ext_mem_destroy() argument
209 struct tipc_ext_mem* tem = containerof(obj, struct tipc_ext_mem, vmm_obj); in tipc_ext_mem_destroy()
231 static bool vmm_obj_is_tipc_ext_mem(struct vmm_obj* obj) { in vmm_obj_is_tipc_ext_mem() argument
232 return obj->ops == &tipc_ext_mem_ops; in vmm_obj_is_tipc_ext_mem()
235 static struct tipc_ext_mem* vmm_obj_to_tipc_ext_mem(struct vmm_obj* obj) { in vmm_obj_to_tipc_ext_mem() argument
236 if (vmm_obj_is_tipc_ext_mem(obj)) { in vmm_obj_to_tipc_ext_mem()
[all …]
Dsyscall.c373 if (!slice.obj || !slice.obj->ops) { in sys_prepare_dma()
381 ret = slice.obj->ops->get_page(slice.obj, slice.offset + mapped_size, in sys_prepare_dma()
420 ret = trusty_app_allow_dma_range(trusty_app, slice.obj, slice.offset, in sys_prepare_dma()
Devent.c129 struct obj refobj;
226 static void event_source_obj_destroy(struct obj* obj) { in event_source_obj_destroy() argument
227 struct event_source* es = containerof(obj, struct event_source, refobj); in event_source_obj_destroy()
Dtrusty_virtio.c68 struct obj refobj;
106 static void signal_client_bus_free(struct obj* obj) { in signal_client_bus_free() argument
108 containerof_null_safe(obj, struct trusty_virtio_bus, refobj); in signal_client_bus_free()
/trusty/kernel/lib/extmem/include/lib/extmem/
Dextmem.h115 void ext_mem_obj_initialize(struct ext_mem_obj* obj,
134 bool ext_mem_insert(struct bst_root* objs, struct ext_mem_obj* obj);
145 struct ext_mem_obj* obj) { in ext_mem_delete() argument
146 bst_delete(objs, &obj->node); in ext_mem_delete()
168 void ext_mem_obj_set_match_tag(struct vmm_obj* obj, uint64_t match_tag);
182 int ext_mem_obj_check_flags(struct vmm_obj* obj, uint* arch_mmu_flags);
197 int ext_mem_obj_get_page(struct vmm_obj* obj,
/trusty/user/app/storage/
Dblock_cache_priv.h132 struct obj obj; member
Dblock_cache.c324 return !list_is_empty(&entry->obj.ref_list); in block_cache_entry_has_refs()
334 return list_length(&entry->obj.ref_list) == 1; in block_cache_entry_has_one_ref()
858 obj_add_ref_allow_unreferenced_obj(&entry->obj, ref); in block_cache_get()
935 static void block_cache_entry_destroy(struct obj* obj) { in block_cache_entry_destroy() argument
937 containerof(obj, struct block_cache_entry, obj); in block_cache_entry_destroy()
972 obj_init(&block_cache_entries[i].obj, &ref); in block_cache_init()
975 obj_del_ref(&block_cache_entries[i].obj, &ref, in block_cache_init()
1636 obj_del_ref(&entry->obj, ref, block_cache_entry_destroy); in block_put()
/trusty/user/base/lib/tipc/rust/src/
Dserialization.rs28 unsafe fn serialize_as_bytes<T: Sized>(&mut self, obj: &'s T) -> Result<Self::Ok, Self::Error> { in serialize_as_bytes()
29 let ptr = obj as *const _ as *const u8; in serialize_as_bytes()
/trusty/kernel/lib/vmm_obj_service/include/lib/vmm_obj_service/
Dvmm_obj_service.h61 struct vmm_obj* obj,
/trusty/kernel/lib/trusty/include/lib/trusty/
Dmemref.h48 status_t memref_create_from_vmm_obj(struct vmm_obj *obj,
Dtipc_virtio_dev.h105 struct vmm_obj* tipc_ext_mem_vmm_obj_to_ext_mem_vmm_obj(struct vmm_obj* obj);
Dipc.h91 struct obj refobj;
/trusty/kernel/lib/vmm_obj_service/
Dvmm_obj_service.c41 struct vmm_obj* obj, in vmm_obj_service_create_ro() argument
76 rc = memref_create_from_vmm_obj(obj, offset, size, MMAP_FLAG_PROT_READ, in vmm_obj_service_create_ro()
/trusty/kernel/services/apploader/
Dapploader_service.c130 if (channel_ctx->vmm_obj_slice.obj) { in apploader_service_handle_cmd_get_memory()
196 if (!channel_ctx->vmm_obj_slice.obj) { in apploader_service_handle_cmd_load_application()
202 if (!vmm_obj_has_only_ref(channel_ctx->vmm_obj_slice.obj, in apploader_service_handle_cmd_load_application()
233 channel_ctx->vmm_obj_slice.obj, 0, in apploader_service_handle_cmd_load_application()
/trusty/kernel/make/
Dhost_lib.mk63 GENERIC_OBJ_DIR := $(BUILDDIR)/host_libs/obj/$(HOST_LIB_NAME)$(HOST_LIB_VARIANT)
Dhost_tool.mk100 GENERIC_OBJ_DIR := $(BUILDDIR)/host_tools/obj/$(HOST_TOOL_NAME)
Dhost_test.mk86 GENERIC_OBJ_DIR := $(HOST_TEST_BUILDDIR)/host_tests/obj/$(HOST_TEST)
/trusty/kernel/app/mmutest/
Dmmutest.c348 EXPECT_NE(NULL, slice.obj); in TEST()
1158 ASSERT_EQ(true, obj_has_only_ref(&slice.obj->obj, &slice.obj_ref)); in TEST_F()
1160 if (slice_init == NO_ERROR && obj_has_ref(&slice.obj->obj)) in TEST_F()
1161 obj_del_ref(&slice.obj->obj, &slice.obj_ref, NULL); in TEST_F()
1180 ASSERT_EQ(true, obj_has_only_ref(&slice.obj->obj, &slice.obj_ref)); in TEST_F()
/trusty/kernel/lib/dtb_service/
Ddtb_service.cpp92 rc = vmm_obj_service_create_ro(dtb_port, &dtb_service_port_acl, slice.obj, in dtb_service_add_user()
/trusty/vendor/google/aosp/scripts/
Dtrusty_build_config.py263 for obj in inp:
264 if isinstance(obj, list):
265 _flatten_list(obj, out)
267 out.append(obj)

12