Home
last modified time | relevance | path

Searched refs:msg (Results 1 – 25 of 65) sorted by relevance

123

/trusted-firmware-m-latest/secure_fw/spm/include/
Dtfm_spm_log.h38 #define SPMLOG_DBGMSGVAL(msg, val) spm_log_msgval(msg, sizeof(msg), val) argument
39 #define SPMLOG_DBGMSG(msg) tfm_hal_output_spm_log(msg, sizeof(msg)) argument
41 #define SPMLOG_DBGMSGVAL(msg, val) argument
42 #define SPMLOG_DBGMSG(msg) argument
46 #define SPMLOG_INFMSGVAL(msg, val) spm_log_msgval(msg, sizeof(msg), val) argument
47 #define SPMLOG_INFMSG(msg) tfm_hal_output_spm_log(msg, sizeof(msg)) argument
49 #define SPMLOG_INFMSGVAL(msg, val) argument
50 #define SPMLOG_INFMSG(msg) argument
54 #define SPMLOG_ERRMSGVAL(msg, val) spm_log_msgval(msg, sizeof(msg), val) argument
55 #define SPMLOG_ERRMSG(msg) tfm_hal_output_spm_log(msg, sizeof(msg)) argument
[all …]
/trusted-firmware-m-latest/secure_fw/partitions/protected_storage/
Dtfm_ps_req_mngr.c23 static psa_status_t tfm_ps_set_req(const psa_msg_t *msg) in tfm_ps_set_req() argument
30 client_id = msg->client_id; in tfm_ps_set_req()
32 if (msg->in_size[0] != sizeof(uid) || in tfm_ps_set_req()
33 msg->in_size[2] != sizeof(create_flags)) { in tfm_ps_set_req()
38 num = psa_read(msg->handle, 0, &uid, sizeof(uid)); in tfm_ps_set_req()
43 num = psa_read(msg->handle, 2, &create_flags, sizeof(create_flags)); in tfm_ps_set_req()
48 return tfm_ps_set(client_id, uid, msg->in_size[1], create_flags); in tfm_ps_set_req()
51 static psa_status_t tfm_ps_get_req(const psa_msg_t *msg) in tfm_ps_get_req() argument
58 if (msg->in_size[0] != sizeof(uid) || in tfm_ps_get_req()
59 msg->in_size[1] != sizeof(data_offset)) { in tfm_ps_get_req()
[all …]
/trusted-firmware-m-latest/secure_fw/partitions/internal_trusted_storage/
Dtfm_its_req_mngr.c28 static psa_status_t tfm_its_set_req(const psa_msg_t *msg) in tfm_its_set_req() argument
35 if (msg->in_size[0] != sizeof(uid) || in tfm_its_set_req()
36 msg->in_size[2] != sizeof(create_flags)) { in tfm_its_set_req()
41 num = psa_read(msg->handle, 0, &uid, sizeof(uid)); in tfm_its_set_req()
46 num = psa_read(msg->handle, 2, &create_flags, sizeof(create_flags)); in tfm_its_set_req()
50 data_length = msg->in_size[1]; in tfm_its_set_req()
53 p_data = (uint8_t *)psa_map_invec(msg->handle, 1); in tfm_its_set_req()
58 handle = msg->handle; in tfm_its_set_req()
60 return tfm_its_set(msg->client_id, uid, data_length, create_flags); in tfm_its_set_req()
63 static psa_status_t tfm_its_get_req(const psa_msg_t *msg) in tfm_its_get_req() argument
[all …]
/trusted-firmware-m-latest/secure_fw/partitions/platform/
Dplatform_sp.c29 typedef enum tfm_platform_err_t (*plat_func_t)(const psa_msg_t *msg);
42 static psa_status_t platform_sp_system_reset_psa_api(const psa_msg_t *msg)
44 (void)msg; /* unused parameter */
83 static psa_status_t platform_sp_nv_read_psa_api(const psa_msg_t *msg) in platform_sp_nv_read_psa_api() argument
92 while ((in_len > 0) && (msg->in_size[in_len - 1] == 0)) { in platform_sp_nv_read_psa_api()
97 while ((out_len > 0) && (msg->out_size[out_len - 1] == 0)) { in platform_sp_nv_read_psa_api()
101 if (msg->in_size[0] != NV_COUNTER_ID_SIZE || in platform_sp_nv_read_psa_api()
102 msg->out_size[0] > NV_COUNTER_SIZE || in platform_sp_nv_read_psa_api()
107 num = psa_read(msg->handle, 0, &counter_id, msg->in_size[0]); in platform_sp_nv_read_psa_api()
112 if (msg->client_id < 0) { in platform_sp_nv_read_psa_api()
[all …]
/trusted-firmware-m-latest/platform/ext/target/arm/rse/common/rse_handshake/
Drse_handshake.c84 static int32_t header_init(struct rse_handshake_msg *msg, in header_init() argument
89 msg->header.type = type; in header_init()
92 sizeof(msg->header.rse_id), in header_init()
93 (uint8_t*)&msg->header.rse_id); in header_init()
97 err = cc3xx_lowlevel_rng_get_random((uint8_t *)&msg->header.ccm_iv, in header_init()
98 sizeof(msg->header.ccm_iv)); in header_init()
106 static int32_t construct_session_key_msg(struct rse_handshake_msg *msg, in construct_session_key_msg() argument
111 err = header_init(msg, RSE_HANDSHAKE_SESSION_KEY_MSG); in construct_session_key_msg()
116 dpa_hardened_word_copy(msg->body.session_key_msg.session_key_iv, in construct_session_key_msg()
122 static int32_t construct_vhuk_msg(struct rse_handshake_msg *msg, in construct_vhuk_msg() argument
[all …]
/trusted-firmware-m-latest/secure_fw/partitions/initial_attestation/
Dtfm_attest_req_mngr.c24 typedef psa_status_t (*attest_func_t)(const psa_msg_t *msg);
29 static psa_status_t psa_attest_get_token(const psa_msg_t *msg) in psa_attest_get_token() argument
38 token_buff_size = msg->out_size[0]; in psa_attest_get_token()
39 challenge_size = msg->in_size[0]; in psa_attest_get_token()
47 g_attest_caller_id = msg->client_id; in psa_attest_get_token()
49 challenge_buff = psa_map_invec(msg->handle, 0); in psa_attest_get_token()
50 token_buff = psa_map_outvec(msg->handle, 0); in psa_attest_get_token()
55 psa_unmap_outvec(msg->handle, 0, token_size); in psa_attest_get_token()
64 static psa_status_t psa_attest_get_token(const psa_msg_t *msg) in psa_attest_get_token() argument
73 challenge_size = msg->in_size[0]; in psa_attest_get_token()
[all …]
/trusted-firmware-m-latest/secure_fw/partitions/firmware_update/
Dtfm_fwu_req_mngr.c38 static psa_status_t tfm_fwu_start(const psa_msg_t *msg) in tfm_fwu_start() argument
52 if (msg->in_size[0] != sizeof(component)) { in tfm_fwu_start()
55 if (msg->in_size[1] > TFM_CONFIG_FWU_MAX_MANIFEST_SIZE) { in tfm_fwu_start()
58 psa_read(msg->handle, 0, &component, sizeof(component)); in tfm_fwu_start()
63 manifest_size = msg->in_size[1]; in tfm_fwu_start()
66 manifest = (uint8_t *)psa_map_invec(msg->handle, 1); in tfm_fwu_start()
68 psa_read(msg->handle, 1, manifest, manifest_size); in tfm_fwu_start()
100 static psa_status_t tfm_fwu_write(const psa_msg_t *msg) in tfm_fwu_write() argument
113 if (msg->in_size[2] > PSA_FWU_MAX_WRITE_SIZE) { in tfm_fwu_write()
116 block_size = msg->in_size[2]; in tfm_fwu_write()
[all …]
/trusted-firmware-m-latest/platform/ext/target/arm/rse/common/rse_comms/
Drse_comms_protocol_pointer_access.c15 struct rse_pointer_access_msg_t *msg, size_t msg_len) in rse_protocol_pointer_access_deserialize_msg() argument
22 if (msg_len != sizeof(*msg)) { in rse_protocol_pointer_access_deserialize_msg()
26 req->in_len = PARAM_UNPACK_IN_LEN(msg->ctrl_param); in rse_protocol_pointer_access_deserialize_msg()
27 req->out_len = PARAM_UNPACK_OUT_LEN(msg->ctrl_param); in rse_protocol_pointer_access_deserialize_msg()
28 req->type = PARAM_UNPACK_TYPE(msg->ctrl_param); in rse_protocol_pointer_access_deserialize_msg()
29 req->handle = msg->handle; in rse_protocol_pointer_access_deserialize_msg()
39 msg->host_ptrs[idx], in rse_protocol_pointer_access_deserialize_msg()
40 msg->io_sizes[idx], in rse_protocol_pointer_access_deserialize_msg()
46 err = comms_atu_alloc_region(msg->host_ptrs[idx], in rse_protocol_pointer_access_deserialize_msg()
47 msg->io_sizes[idx], in rse_protocol_pointer_access_deserialize_msg()
[all …]
Drse_comms_protocol_embed.c15 struct client_request_t *req, struct rse_embed_msg_t *msg, in rse_protocol_embed_deserialize_msg() argument
21 if (msg_len < (sizeof(*msg) - sizeof(msg->payload))) { in rse_protocol_embed_deserialize_msg()
25 req->in_len = PARAM_UNPACK_IN_LEN(msg->ctrl_param); in rse_protocol_embed_deserialize_msg()
26 req->out_len = PARAM_UNPACK_OUT_LEN(msg->ctrl_param); in rse_protocol_embed_deserialize_msg()
27 req->type = PARAM_UNPACK_TYPE(msg->ctrl_param); in rse_protocol_embed_deserialize_msg()
28 req->handle = msg->handle; in rse_protocol_embed_deserialize_msg()
38 req->in_vec[i].len = msg->io_size[i]; in rse_protocol_embed_deserialize_msg()
39 payload_size += msg->io_size[i]; in rse_protocol_embed_deserialize_msg()
44 || payload_size > sizeof(msg->payload) in rse_protocol_embed_deserialize_msg()
45 || sizeof(*msg) - sizeof(msg->payload) + payload_size > msg_len ) { in rse_protocol_embed_deserialize_msg()
[all …]
Drse_comms_protocol.c14 struct client_request_t *req, struct serialized_psa_msg_t *msg, in rse_protocol_deserialize_msg() argument
17 if (msg_len < sizeof(msg->header)) { in rse_protocol_deserialize_msg()
21 req->protocol_ver = msg->header.protocol_ver; in rse_protocol_deserialize_msg()
22 req->seq_num = msg->header.seq_num; in rse_protocol_deserialize_msg()
23 req->client_id = msg->header.client_id; in rse_protocol_deserialize_msg()
25 switch (msg->header.protocol_ver) { in rse_protocol_deserialize_msg()
29 return rse_protocol_embed_deserialize_msg(req, &msg->msg.embed, in rse_protocol_deserialize_msg()
35 return rse_protocol_pointer_access_deserialize_msg(req, &msg->msg.pointer_access, in rse_protocol_deserialize_msg()
Drse_comms_hal.c24 static __ALIGNED(4) struct serialized_psa_msg_t msg; variable
72 size_t msg_len = sizeof(msg); in tfm_multi_core_hal_receive()
75 memset(&msg, 0, sizeof(msg)); in tfm_multi_core_hal_receive()
79 mhu_err = mhu_receive_data(mhu_receiver_dev, (uint8_t *)&msg, &msg_len); in tfm_multi_core_hal_receive()
95 SPMLOG_DBGMSGVAL("[COMMS] seq_num=", msg.header.seq_num); in tfm_multi_core_hal_receive()
108 err = rse_protocol_deserialize_msg(req, &msg, msg_len); in tfm_multi_core_hal_receive()
126 if (rse_protocol_serialize_error(req, &msg.header, in tfm_multi_core_hal_receive()
/trusted-firmware-m-latest/secure_fw/spm/core/
Dspm_log.c23 static void to_hex(uint32_t value, char msg[]) in to_hex() argument
27 msg[i--] = '\n'; in to_hex()
28 msg[i--] = '\r'; in to_hex()
30 msg[i] = HEX_TABLE[value & 0xF]; in to_hex()
32 msg[i--] = 'x'; in to_hex()
33 msg[i--] = '0'; in to_hex()
36 int32_t spm_log_msgval(const char *msg, size_t len, uint32_t value) in spm_log_msgval() argument
41 if (msg && len) { in spm_log_msgval()
42 result_msg = tfm_hal_output_spm_log(msg, len); in spm_log_msgval()
Dpsa_mmiovec_api.c43 if (handle->msg.type < PSA_IPC_CALL) { in tfm_spm_partition_psa_map_invec()
56 if (handle->msg.in_size[invec_idx] == 0) { in tfm_spm_partition_psa_map_invec()
82 handle->msg.in_size[invec_idx], TFM_HAL_ACCESS_READABLE); in tfm_spm_partition_psa_map_invec()
115 if (handle->msg.type < PSA_IPC_CALL) { in tfm_spm_partition_psa_unmap_invec()
173 if (handle->msg.type < PSA_IPC_CALL) { in tfm_spm_partition_psa_map_outvec()
186 if (handle->msg.out_size[outvec_idx] == 0) { in tfm_spm_partition_psa_map_outvec()
211 handle->msg.out_size[outvec_idx], TFM_HAL_ACCESS_READWRITE); in tfm_spm_partition_psa_map_outvec()
243 if (handle->msg.type < PSA_IPC_CALL) { in tfm_spm_partition_psa_unmap_outvec()
258 if (len > handle->msg.out_size[outvec_idx]) { in tfm_spm_partition_psa_unmap_outvec()
Dpsa_read_write_skip_api.c33 if (handle->msg.type < PSA_IPC_CALL) { in tfm_spm_partition_psa_read()
57 remaining = handle->msg.in_size[invec_idx] - handle->invec_accessed[invec_idx]; in tfm_spm_partition_psa_read()
101 if (handle->msg.type < PSA_IPC_CALL) { in tfm_spm_partition_psa_skip()
125 remaining = handle->msg.in_size[invec_idx] - handle->invec_accessed[invec_idx]; in tfm_spm_partition_psa_skip()
162 if (handle->msg.type < PSA_IPC_CALL) { in tfm_spm_partition_psa_write()
178 if (num_bytes > handle->msg.out_size[outvec_idx] - handle->outvec_written[outvec_idx]) { in tfm_spm_partition_psa_write()
Dpsa_call_api.c39 p_connection->msg.type = type; in spm_associate_call_params()
108 spm_memset(p_connection->msg.in_size, 0, sizeof(p_connection->msg.in_size)); in spm_associate_call_params()
109 spm_memset(p_connection->msg.out_size, 0, sizeof(p_connection->msg.out_size)); in spm_associate_call_params()
123 p_connection->msg.in_size[i] = ivecs_local[i].len; in spm_associate_call_params()
146 p_connection->msg.out_size[i] = ovecs_local[i].len; in spm_associate_call_params()
Dpsa_api.c116 psa_status_t tfm_spm_partition_psa_get(psa_signal_t signal, psa_msg_t *msg) in tfm_spm_partition_psa_get() argument
138 partition->boundary, (uintptr_t)msg, in tfm_spm_partition_psa_get()
194 spm_memcpy(msg, &handle->msg, sizeof(psa_msg_t)); in tfm_spm_partition_psa_get()
224 switch (handle->msg.type) { in tfm_spm_partition_psa_reply()
254 if (handle->msg.type >= PSA_IPC_CALL) { in tfm_spm_partition_psa_reply()
289 if (!TFM_CLIENT_ID_IS_NS(handle->msg.client_id)) { in tfm_spm_partition_psa_reply()
/trusted-firmware-m-latest/platform/ext/target/arm/corstone1000/rse_comms/
Drse_comms_protocol_embed.c15 struct client_request_t *req, struct rse_embed_msg_t *msg, in rse_protocol_embed_deserialize_msg() argument
21 if (msg_len < (sizeof(*msg) - sizeof(msg->payload))) { in rse_protocol_embed_deserialize_msg()
25 req->in_len = PARAM_UNPACK_IN_LEN(msg->ctrl_param); in rse_protocol_embed_deserialize_msg()
26 req->out_len = PARAM_UNPACK_OUT_LEN(msg->ctrl_param); in rse_protocol_embed_deserialize_msg()
27 req->type = PARAM_UNPACK_TYPE(msg->ctrl_param); in rse_protocol_embed_deserialize_msg()
28 req->handle = msg->handle; in rse_protocol_embed_deserialize_msg()
38 req->in_vec[i].len = msg->io_size[i]; in rse_protocol_embed_deserialize_msg()
39 payload_size += msg->io_size[i]; in rse_protocol_embed_deserialize_msg()
44 || payload_size > sizeof(msg->payload) in rse_protocol_embed_deserialize_msg()
45 || sizeof(*msg) - sizeof(msg->payload) + payload_size > msg_len ) { in rse_protocol_embed_deserialize_msg()
[all …]
Drse_comms_protocol.c14 struct client_request_t *req, struct serialized_psa_msg_t *msg, in rse_protocol_deserialize_msg() argument
17 if (msg_len < sizeof(msg->header)) { in rse_protocol_deserialize_msg()
21 req->protocol_ver = msg->header.protocol_ver; in rse_protocol_deserialize_msg()
22 req->seq_num = msg->header.seq_num; in rse_protocol_deserialize_msg()
23 req->client_id = msg->header.client_id; in rse_protocol_deserialize_msg()
25 switch (msg->header.protocol_ver) { in rse_protocol_deserialize_msg()
29 return rse_protocol_embed_deserialize_msg(req, &msg->msg.embed, in rse_protocol_deserialize_msg()
35 return rse_protocol_pointer_access_deserialize_msg(req, &msg->msg.pointer_access, in rse_protocol_deserialize_msg()
Drse_comms_hal.c24 static __ALIGNED(4) struct serialized_psa_msg_t msg; variable
80 size_t msg_len = sizeof(msg); in tfm_multi_core_hal_receive()
83 memset(&msg, 0, sizeof(msg)); in tfm_multi_core_hal_receive()
87 mhu_err = mhu_receive_data(mhu_receiver_dev, (uint8_t *)&msg, &msg_len); in tfm_multi_core_hal_receive()
103 SPMLOG_DBGMSGVAL("[COMMS] seq_num=", msg.header.seq_num); in tfm_multi_core_hal_receive()
116 err = rse_protocol_deserialize_msg(req, &msg, msg_len); in tfm_multi_core_hal_receive()
134 if (rse_protocol_serialize_error(req, &msg.header, in tfm_multi_core_hal_receive()
/trusted-firmware-m-latest/secure_fw/partitions/crypto/
Dcrypto_init.c60 static psa_status_t tfm_crypto_init_iovecs(const psa_msg_t *msg, in tfm_crypto_init_iovecs() argument
70 in_vec[i].len = msg->in_size[i]; in tfm_crypto_init_iovecs()
72 in_vec[i].base = psa_map_invec(msg->handle, i); in tfm_crypto_init_iovecs()
79 out_vec[i].len = msg->out_size[i]; in tfm_crypto_init_iovecs()
81 out_vec[i].base = psa_map_outvec(msg->handle, i); in tfm_crypto_init_iovecs()
154 static psa_status_t tfm_crypto_init_iovecs(const psa_msg_t *msg, in tfm_crypto_init_iovecs() argument
167 status = tfm_crypto_alloc_scratch(msg->in_size[i], &alloc_buf_ptr); in tfm_crypto_init_iovecs()
174 psa_read(msg->handle, i, alloc_buf_ptr, msg->in_size[i]); in tfm_crypto_init_iovecs()
181 status = tfm_crypto_alloc_scratch(msg->out_size[i], &alloc_buf_ptr); in tfm_crypto_init_iovecs()
188 out_vec[i].len = msg->out_size[i]; in tfm_crypto_init_iovecs()
[all …]
/trusted-firmware-m-latest/lib/ext/cryptocell-312-runtime/utils/src/common/
Dcommon_sb_ops.h62 #define RSA_LOADKEY_RELEASE(msg) \ argument
65 printf("\n%s\n", msg); \
76 #define CALCULATE_NP_RELEASE(msg) \ argument
79 printf("\n%s\n", msg); \
96 #define CALCULATE_H_RELEASE(msg) \ argument
99 printf("\n%s\n", msg); \
/trusted-firmware-m-latest/bl2/ext/mcuboot/scripts/
Dmacro_parser.py28 msg = "The script was probably invoked manually"
29 msg += " with having certain macros nested in flash_layouts.h.\n"
30 msg += "Please revisit the flash_layout.h file and hardcode values"
31 msg += " for the (NON-)SECURE_IMAGE_OFFSET and"
32 msg += " (NON-)SECURE_IMAGE_MAX_SIZE macros"
33 raise Exception(msg)
/trusted-firmware-m-latest/docs/design_docs/
Dtfm_log_system_design_document.rst58 The following three APIs LOG APIs output the given 'msg' with hexadecimal
60 numbers inside SPM. The 'msg' can be skipped with giving an empty string like
61 "". And these APIs supports constant 'msg' string only, giving a runtime string
62 as parameter 'msg' would potentially cause a runtime error.
64 SPMLOG_DBGMSGVAL(msg, val);
66 SPMLOG_INFMSGVAL(msg, val);
68 SPMLOG_ERRMSGVAL(msg, val);
77 * can be skipped if the 'msg' is 'NULL' or 'len' equals 0. The
82 * \param[in] msg A string message
89 int32_t spm_log_msgval(const char *msg, size_t len, uint32_t value)
[all …]
/trusted-firmware-m-latest/bl1/bl1_1/shared_lib/interface/
Dlog.h19 const unsigned char msg[] = str; \
20 stdio_output_string(msg, sizeof(msg) - 1); \
/trusted-firmware-m-latest/secure_fw/partitions/lib/runtime/
Dsfn_common_thread.c23 psa_msg_t msg; in common_sfn_thread() local
50 psa_get(sig, &msg); in common_sfn_thread()
51 psa_reply(msg.handle, ((service_fn_t)p_sfn_table[i])(&msg)); in common_sfn_thread()

123