/trusty/user/app/storage/ |
D | block_device_tipc.c | 110 static int rpmb_check(struct block_device_tipc* state, uint16_t block) { in rpmb_check() argument 113 ret = rpmb_read(state->rpmb_state, tmp, block, 1); in rpmb_check() 118 static uint32_t rpmb_search_size(struct block_device_tipc* state, in rpmb_search_size() argument 126 ret = rpmb_check(state, curr); in rpmb_search_size() 163 ret = rpmb_read(dev_rpmb->state->rpmb_state, tmp, in block_device_tipc_rpmb_start_read() 204 ret = rpmb_write(dev_rpmb->state->rpmb_state, data, in block_device_tipc_rpmb_start_write() 230 ret = ns_read_pos(dev_ns->state->ipc_handle, dev_ns->ns_handle, in block_device_tipc_ns_start_read() 254 ret = ns_write_pos(dev_ns->state->ipc_handle, dev_ns->ns_handle, in block_device_tipc_ns_start_write() 271 struct block_device_tipc* state, in block_device_tipc_init_dev_rpmb() argument 284 dev_rpmb->state = state; in block_device_tipc_init_dev_rpmb() [all …]
|
D | rpmb.c | 210 int rpmb_program_key(struct rpmb_state* state, const struct rpmb_key* key) { in rpmb_program_key() argument 222 ret = rpmb_send(state->mmc_handle, &cmd, sizeof(cmd), &rescmd, in rpmb_program_key() 239 static int rpmb_read_counter(struct rpmb_state* state, in rpmb_read_counter() argument 250 ret = rpmb_send(state->mmc_handle, NULL, 0, &cmd, sizeof(cmd), &res, in rpmb_read_counter() 255 ret = rpmb_mac(state->key, &res, 1, &mac); in rpmb_read_counter() 277 static int rpmb_read_counter_retry(struct rpmb_state* state, in rpmb_read_counter_retry() argument 282 ret = rpmb_read_counter(state, write_counter); in rpmb_read_counter_retry() 293 static int rpmb_read_data(struct rpmb_state* state, in rpmb_read_data() argument 316 if (!state) in rpmb_read_data() 318 if (state->verify_failed) in rpmb_read_data() [all …]
|
D | rpmb.h | 34 void rpmb_set_key(struct rpmb_state* state, const struct rpmb_key* key); 36 int rpmb_read(struct rpmb_state* state, 40 int rpmb_read_no_mac(struct rpmb_state* state, 44 int rpmb_verify(struct rpmb_state* state, 48 int rpmb_program_key(struct rpmb_state* state, const struct rpmb_key* key); 50 int rpmb_write(struct rpmb_state* state,
|
D | block_device_tipc.h | 69 struct block_device_tipc* state; member 84 struct block_device_tipc* state; member 129 int block_device_tipc_init(struct block_device_tipc* state, 136 void block_device_tipc_uninit(struct block_device_tipc* state);
|
D | block_tree.h | 131 void block_tree_walk(struct transaction* state, 160 void block_tree_insert(struct transaction* state, 165 void block_tree_insert_block_mac(struct transaction* state, 170 void block_tree_update(struct transaction* state, 177 void block_tree_update_block_mac(struct transaction* state, 184 void block_tree_remove(struct transaction* state,
|
/trusty/kernel/lib/libc-trusty/ |
D | libc_state.c | 25 struct libc_state* state = calloc(1, sizeof(struct libc_state)); in libc_state_create() local 26 if (state != NULL) { in libc_state_create() 27 state->errno_val = 0; in libc_state_create() 28 state->locale = C_LOCALE; in libc_state_create() 30 return state; in libc_state_create() 37 struct libc_state* state = libc_state_create(); in libc_state_thread_init() local 38 if (state == NULL) { in libc_state_thread_init() 41 thread_tls_set(t, TLS_ENTRY_LIBC, (uintptr_t)state); in libc_state_thread_init() 49 struct libc_state* state = in libc_state_thread_free() local 51 ASSERT(state); in libc_state_thread_free() [all …]
|
/trusty/kernel/lib/trusty/ |
D | event.c | 145 volatile int state; member 153 volatile int state; member 208 spin_lock_saved_state_t state; in event_source_poll() local 212 spin_lock_save(&es->slock, &state, SLOCK_FLAGS); in event_source_poll() 213 oldstate = es->state; in event_source_poll() 215 es->state = EVENT_STATE_UNSIGNALED; in event_source_poll() 217 spin_unlock_restore(&es->slock, state, SLOCK_FLAGS); in event_source_poll() 234 spin_lock_saved_state_t state; in event_source_destroy() local 252 spin_lock_save(&es->slock, &state, SLOCK_FLAGS); in event_source_destroy() 253 es->state = EVENT_STATE_CLOSED; in event_source_destroy() [all …]
|
D | trusty_virtio.c | 64 volatile int state; member 127 spin_lock_saved_state_t state; in release_bus_ref() local 128 spin_lock_irqsave(&virtio_buses_tree_lock, state); in release_bus_ref() 132 spin_unlock_irqrestore(&virtio_buses_tree_lock, state); in release_bus_ref() 143 new_bus->state = VIRTIO_BUS_STATE_UNINITIALIZED; in alloc_new_bus() 171 spin_lock_saved_state_t state; in create_new_bus() local 172 spin_lock_irqsave(&virtio_buses_tree_lock, state); in create_new_bus() 186 spin_unlock_irqrestore(&virtio_buses_tree_lock, state); in create_new_bus() 211 spin_lock_saved_state_t state; in get_client_bus() local 212 spin_lock_irqsave(&virtio_buses_tree_lock, state); in get_client_bus() [all …]
|
D | handle.c | 95 spin_lock_saved_state_t state; in _prepare_wait_handle() local 97 spin_lock_save(&handle->slock, &state, SPIN_LOCK_FLAG_INTERRUPTS); in _prepare_wait_handle() 104 spin_unlock_restore(&handle->slock, state, SPIN_LOCK_FLAG_INTERRUPTS); in _prepare_wait_handle() 109 spin_lock_saved_state_t state; in _finish_wait_handle() local 112 spin_lock_save(&handle->slock, &state, SPIN_LOCK_FLAG_INTERRUPTS); in _finish_wait_handle() 114 spin_unlock_restore(&handle->slock, state, SPIN_LOCK_FLAG_INTERRUPTS); in _finish_wait_handle() 118 spin_lock_saved_state_t state; in handle_add_waiter() local 120 spin_lock_save(&h->slock, &state, SPIN_LOCK_FLAG_INTERRUPTS); in handle_add_waiter() 122 spin_unlock_restore(&h->slock, state, SPIN_LOCK_FLAG_INTERRUPTS); in handle_add_waiter() 126 spin_lock_saved_state_t state; in handle_del_waiter() local [all …]
|
/trusty/user/base/app/coverage/ |
D | main.c | 29 struct srv_state state; in main() local 36 state.hset = hset; in main() 38 list_initialize(&state.coverage_record_list); in main() 40 rc = cov_shm_alloc(&state.mailbox, MAX_NUM_APPS); in main() 46 rc = coverage_aggregator_init(&state); in main() 52 rc = coverage_client_init(&state); in main()
|
D | coverage.h | 47 struct srv_state* state) { in set_srv_state() argument 48 port->priv = state; in set_srv_state() 94 int coverage_aggregator_init(struct srv_state* state); 102 int coverage_client_init(struct srv_state* state);
|
D | aggregator.c | 80 struct srv_state* state = get_srv_state(port); in on_connect() local 85 record = find_coverage_record(&state->coverage_record_list, peer); in on_connect() 99 list_add_tail(&state->coverage_record_list, &record->node); in on_connect() 109 struct srv_state* state = get_srv_state(port); in on_message() local 119 return handle_register(chan, &req, record, &state->mailbox); in on_message() 133 int coverage_aggregator_init(struct srv_state* state) { in coverage_aggregator_init() argument 150 set_srv_state(&port, state); in coverage_aggregator_init() 152 return tipc_add_service(state->hset, &port, 1, MAX_NUM_APPS, &ops); in coverage_aggregator_init()
|
/trusty/user/base/app/line-coverage/ |
D | main.c | 26 static struct srv_state state; variable 37 state.hset = hset; in main() 39 list_initialize(&state.coverage_record_list); in main() 41 rc = cov_shm_alloc(&state.mailbox, MAX_NUM_APPS); in main() 47 rc = coverage_aggregator_init(&state); in main() 53 rc = coverage_client_init(&state); in main()
|
D | coverage.h | 47 struct srv_state* state) { in set_srv_state() argument 48 port->priv = state; in set_srv_state() 91 int coverage_aggregator_init(struct srv_state* state); 99 int coverage_client_init(struct srv_state* state);
|
D | aggregator.c | 82 struct srv_state* state = get_srv_state(port); in on_connect() local 87 record = find_coverage_record(&state->coverage_record_list, peer); in on_connect() 101 list_add_tail(&state->coverage_record_list, &record->node); in on_connect() 111 struct srv_state* state = get_srv_state(port); in on_message() local 121 return handle_register(chan, &req, record, &state->mailbox); in on_message() 135 int coverage_aggregator_init(struct srv_state* state) { in coverage_aggregator_init() argument 152 set_srv_state(&port, state); in coverage_aggregator_init() 154 return tipc_add_service(state->hset, &port, 1, MAX_NUM_APPS, &ops); in coverage_aggregator_init()
|
/trusty/user/base/app/metrics/ |
D | consumer.c | 49 struct srv_state* state = get_srv_state(port); in on_connect() local 53 if(state->ns_handle != INVALID_IPC_HANDLE) { in on_connect() 54 close(state->ns_handle); in on_connect() 56 state->ns_handle = chan; in on_connect() 75 struct srv_state* state = get_srv_state(port); in on_message() local 76 if(is_ns_connected(state)) { in on_message() 77 rc = tipc_send1(state->ns_handle, msg, msg_size); in on_message() 107 int add_metrics_consumer_service(struct tipc_hset* hset, struct srv_state* state) { in add_metrics_consumer_service() argument 121 set_srv_state(&port, state); in add_metrics_consumer_service()
|
D | client.h | 32 static inline bool is_ns_connected(struct srv_state* state) { in is_ns_connected() argument 33 return state->ns_handle != INVALID_IPC_HANDLE; in is_ns_connected() 37 struct srv_state* state) { in set_srv_state() argument 38 port->priv = state; in set_srv_state()
|
D | main.cpp | 27 static struct srv_state state; variable 39 state.ns_handle = INVALID_IPC_HANDLE; in main() 41 rc = add_metrics_consumer_service(hset, &state); in main()
|
/trusty/user/base/lib/spi/srv/batch/ |
D | batch.c | 109 struct spi_batch_state* state) { in unpack_shm() argument 130 if (state->cs) { in unpack_shm() 138 if (state->cs) { in unpack_shm() 142 state->cs = true; in unpack_shm() 147 if (state->cs) { in unpack_shm() 149 state->cs = false; in unpack_shm() 173 state->num_cmds); in unpack_shm() 176 state->num_cmds++; in unpack_shm() 185 struct spi_batch_state* state) { in spi_srv_handle_batch() argument 195 assert(!state->cs || !spi_is_bus_shared(spi)); in spi_srv_handle_batch() [all …]
|
/trusty/kernel/app/consoletest/ |
D | consoletest.c | 91 spin_lock_saved_state_t state; in TEST() local 94 arch_interrupt_save(&state, SPIN_LOCK_FLAG_INTERRUPTS); in TEST() 96 arch_interrupt_restore(state, SPIN_LOCK_FLAG_INTERRUPTS); in TEST() 102 spin_lock_saved_state_t state; in TEST() local 106 arch_interrupt_save(&state, SPIN_LOCK_FLAG_INTERRUPTS); in TEST() 108 arch_interrupt_restore(state, SPIN_LOCK_FLAG_INTERRUPTS); in TEST()
|
/trusty/kernel/lib/sm/ |
D | trusty_sched_share.c | 77 spin_lock_saved_state_t state; in trusty_share_register() local 136 spin_lock_irqsave(&sched_shared_datalock, state); in trusty_share_register() 139 spin_unlock_irqrestore(&sched_shared_datalock, state); in trusty_share_register() 151 spin_unlock_irqrestore(&sched_shared_datalock, state); in trusty_share_register() 167 spin_lock_saved_state_t state; in trusty_share_unregister() local 171 spin_lock_irqsave(&sched_shared_datalock, state); in trusty_share_unregister() 175 spin_unlock_irqrestore(&sched_shared_datalock, state); in trusty_share_unregister() 181 spin_unlock_irqrestore(&sched_shared_datalock, state); in trusty_share_unregister() 189 spin_unlock_irqrestore(&sched_shared_datalock, state); in trusty_share_unregister() 238 spin_lock_saved_state_t state; in platform_cpu_priority_set() local [all …]
|
/trusty/user/base/lib/storage/ |
D | storage.c | 368 struct storage_open_dir_state** state) { in storage_open_dir() argument 374 *state = malloc(sizeof(**state)); in storage_open_dir() 375 if (*state == NULL) { in storage_open_dir() 378 resp = (void*)(*state)->buf; in storage_open_dir() 380 (*state)->buf_size = sizeof(*resp); in storage_open_dir() 381 (*state)->buf_last_read = 0; in storage_open_dir() 382 (*state)->buf_read = (*state)->buf_size; in storage_open_dir() 388 struct storage_open_dir_state* state) { in storage_close_dir() argument 389 free(state); in storage_close_dir() 393 struct storage_open_dir_state* state) { in storage_read_dir_send_message() argument [all …]
|
/trusty/user/base/lib/tipc/test/srv/ |
D | srv.c | 216 static void _destroy_service(struct tipc_srv_state* state) { in _destroy_service() argument 217 if (!state) { in _destroy_service() 223 if (state->priv) { in _destroy_service() 224 free(state->priv); in _destroy_service() 225 state->priv = NULL; in _destroy_service() 229 if (state->port != INVALID_IPC_HANDLE) { in _destroy_service() 230 int rc = close(state->port); in _destroy_service() 232 TLOGI("Failed (%d) to close port %d\n", rc, state->port); in _destroy_service() 234 state->port = INVALID_IPC_HANDLE; in _destroy_service() 238 state->service = NULL; in _destroy_service() [all …]
|
/trusty/user/app/cast-auth/app/test-app/ |
D | main.cc | 231 static void CastAuthTest_SetUp(CastAuthTest_t* state) { in CastAuthTest_SetUp() argument 241 state->sess = android::RpcSession::make( in CastAuthTest_SetUp() 243 ASSERT_NE(nullptr, state->sess.get()); in CastAuthTest_SetUp() 245 status = state->sess->setupPreconnectedClient( in CastAuthTest_SetUp() 249 root = state->sess->getRootObject(); in CastAuthTest_SetUp() 252 state->srv = ICastAuth::asInterface(root); in CastAuthTest_SetUp() 253 ASSERT_NE(nullptr, state->srv.get()); in CastAuthTest_SetUp() 258 static void CastAuthTest_TearDown(CastAuthTest_t* state) { in CastAuthTest_TearDown() argument 259 state->srv.clear(); in CastAuthTest_TearDown()
|
/trusty/user/app/sample/binder-test/client/ |
D | main.cpp | 41 static void BinderTest_SetUp(BinderTest_t* state) { in BinderTest_SetUp() argument 51 state->sess = android::RpcSession::make( in BinderTest_SetUp() 53 ASSERT_NE(nullptr, state->sess.get()); in BinderTest_SetUp() 55 status = state->sess->setupPreconnectedClient( in BinderTest_SetUp() 59 root = state->sess->getRootObject(); in BinderTest_SetUp() 62 state->srv = ITestService::asInterface(root); in BinderTest_SetUp() 63 ASSERT_NE(nullptr, state->srv.get()); in BinderTest_SetUp() 68 static void BinderTest_TearDown(BinderTest_t* state) { in BinderTest_TearDown() argument 69 state->srv.clear(); in BinderTest_TearDown() 73 static void CheckRepeat(const BinderTest_t* state, in CheckRepeat() argument [all …]
|