Home
last modified time | relevance | path

Searched refs:rpmb_state (Results 1 – 5 of 5) sorted by relevance

/trusty/user/app/storage/
Drpmb.h28 struct rpmb_state;
33 int rpmb_init(struct rpmb_state** statep, void* mmc_handle);
34 void rpmb_set_key(struct rpmb_state* state, const struct rpmb_key* key);
35 void rpmb_uninit(struct rpmb_state* statep);
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,
Drpmb.c46 struct rpmb_state { struct
210 int rpmb_program_key(struct rpmb_state* state, const struct rpmb_key* key) { in rpmb_program_key()
239 static int rpmb_read_counter(struct rpmb_state* state, in rpmb_read_counter()
277 static int rpmb_read_counter_retry(struct rpmb_state* state, in rpmb_read_counter_retry()
293 static int rpmb_read_data(struct rpmb_state* state, in rpmb_read_data()
373 int rpmb_read(struct rpmb_state* state, in rpmb_read()
381 int rpmb_read_no_mac(struct rpmb_state* state, in rpmb_read_no_mac()
388 int rpmb_verify(struct rpmb_state* state, in rpmb_verify()
405 static bool check_write_counter(struct rpmb_state* state, in check_write_counter()
431 static int rpmb_write_data(struct rpmb_state* state, in rpmb_write_data()
[all …]
Dblock_device_tipc.h101 struct rpmb_state* rpmb_state; member
Dblock_device_tipc.c113 ret = rpmb_read(state->rpmb_state, tmp, block, 1); in rpmb_check()
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()
342 static int block_device_tipc_program_key(struct rpmb_state* state, in block_device_tipc_program_key()
383 static int block_device_tipc_derive_rpmb_key(struct rpmb_state* state, in block_device_tipc_derive_rpmb_key()
433 static int block_device_tipc_init_rpmb_key(struct rpmb_state* state, in block_device_tipc_init_rpmb_key()
506 ret = rpmb_init(&state->rpmb_state, &state->ipc_handle); in block_device_tipc_init()
512 ret = block_device_tipc_init_rpmb_key(state->rpmb_state, rpmb_key, in block_device_tipc_init()
807 rpmb_uninit(state->rpmb_state); in block_device_tipc_init()
842 rpmb_uninit(state->rpmb_state); in block_device_tipc_uninit()
/trusty/user/app/storage/test/storage_host_test/
Dstorageproxy_shim.c45 static struct rpmb_dev_state rpmb_state = { variable
98 rpmb_state.data_fd = in init_rpmb_state()
100 if (rpmb_state.data_fd < 0) { in init_rpmb_state()
106 if (rpmb_state.header.max_block == 0) { in init_rpmb_state()
107 rpmb_state.header.max_block = HOST_TEST_RPMB_SIZE - 1; in init_rpmb_state()
109 rc = write(rpmb_state.data_fd, &rpmb_state.header, in init_rpmb_state()
110 sizeof(rpmb_state.header)); in init_rpmb_state()
111 if (rc != sizeof(rpmb_state.header)) { in init_rpmb_state()
136 if (rpmb_state.data_fd >= 0) { in destroy_rpmb_state()
137 close(rpmb_state.data_fd); in destroy_rpmb_state()
[all …]