Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Backport v2.9-nRF54H20-branch] sdfw_services: psa_crypto: use new tags for pointer-to-const members #19883

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2024 Nordic Semiconductor ASA
# Copyright (c) 2025 Nordic Semiconductor ASA
#
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
#
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
/*
* Copyright (c) 2024 Nordic Semiconductor ASA
* Copyright (c) 2025 Nordic Semiconductor ASA
*
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
*/

/*
* Generated using zcbor version 0.8.1
* Generated using zcbor version 0.9.0
* https://github.com/NordicSemiconductor/zcbor
* Generated with a --default-max-qty of 3
*/
Expand All @@ -22,47 +22,45 @@
#error "The type file was generated with a different default_max_qty than this file"
#endif

#define log_result(state, result, func) \
do { \
if (!result) { \
zcbor_trace_file(state); \
zcbor_log("%s error: %s\r\n", func, \
zcbor_error_str(zcbor_peek_error(state))); \
} else { \
zcbor_log("%s success\r\n", func); \
} \
} while (0)

static bool decode_echo_service_rsp(zcbor_state_t *state, struct echo_service_rsp *result);
static bool decode_echo_service_req(zcbor_state_t *state, struct zcbor_string *result);

static bool decode_echo_service_rsp(zcbor_state_t *state, struct echo_service_rsp *result)
{
zcbor_log("%s\r\n", __func__);

bool tmp_result =
(((zcbor_list_start_decode(state) &&
((((zcbor_int32_decode(state, (&(*result).echo_service_rsp_ret)))) &&
((zcbor_tstr_decode(state, (&(*result).echo_service_rsp_str_out))))) ||
(zcbor_list_map_end_force_decode(state), false)) &&
zcbor_list_end_decode(state))));

if (!tmp_result) {
zcbor_trace_file(state);
zcbor_log("%s error: %s\r\n", __func__, zcbor_error_str(zcbor_peek_error(state)));
} else {
zcbor_log("%s success\r\n", __func__);
}
bool res = (((zcbor_list_start_decode(state) &&
((((zcbor_int32_decode(state, (&(*result).echo_service_rsp_ret)))) &&
((zcbor_tstr_decode(state, (&(*result).echo_service_rsp_str_out))))) ||
(zcbor_list_map_end_force_decode(state), false)) &&
zcbor_list_end_decode(state))));

return tmp_result;
log_result(state, res, __func__);
return res;
}

static bool decode_echo_service_req(zcbor_state_t *state, struct zcbor_string *result)
{
zcbor_log("%s\r\n", __func__);

bool tmp_result = (((zcbor_list_start_decode(state) &&
((((zcbor_tstr_decode(state, (&(*result)))))) ||
(zcbor_list_map_end_force_decode(state), false)) &&
zcbor_list_end_decode(state))));

if (!tmp_result) {
zcbor_trace_file(state);
zcbor_log("%s error: %s\r\n", __func__, zcbor_error_str(zcbor_peek_error(state)));
} else {
zcbor_log("%s success\r\n", __func__);
}
bool res = (((zcbor_list_start_decode(state) &&
((((zcbor_tstr_decode(state, (&(*result)))))) ||
(zcbor_list_map_end_force_decode(state), false)) &&
zcbor_list_end_decode(state))));

return tmp_result;
log_result(state, res, __func__);
return res;
}

int cbor_decode_echo_service_req(const uint8_t *payload, size_t payload_len,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
/*
* Copyright (c) 2024 Nordic Semiconductor ASA
* Copyright (c) 2025 Nordic Semiconductor ASA
*
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
*/

/*
* Generated using zcbor version 0.8.1
* Generated using zcbor version 0.9.0
* https://github.com/NordicSemiconductor/zcbor
* Generated with a --default-max-qty of 3
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
/*
* Copyright (c) 2024 Nordic Semiconductor ASA
* Copyright (c) 2025 Nordic Semiconductor ASA
*
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
*/

/*
* Generated using zcbor version 0.8.1
* Generated using zcbor version 0.9.0
* https://github.com/NordicSemiconductor/zcbor
* Generated with a --default-max-qty of 3
*/
Expand All @@ -22,47 +22,45 @@
#error "The type file was generated with a different default_max_qty than this file"
#endif

#define log_result(state, result, func) \
do { \
if (!result) { \
zcbor_trace_file(state); \
zcbor_log("%s error: %s\r\n", func, \
zcbor_error_str(zcbor_peek_error(state))); \
} else { \
zcbor_log("%s success\r\n", func); \
} \
} while (0)

static bool encode_echo_service_rsp(zcbor_state_t *state, const struct echo_service_rsp *input);
static bool encode_echo_service_req(zcbor_state_t *state, const struct zcbor_string *input);

static bool encode_echo_service_rsp(zcbor_state_t *state, const struct echo_service_rsp *input)
{
zcbor_log("%s\r\n", __func__);

bool tmp_result =
(((zcbor_list_start_encode(state, 2) &&
((((zcbor_int32_encode(state, (&(*input).echo_service_rsp_ret)))) &&
((zcbor_tstr_encode(state, (&(*input).echo_service_rsp_str_out))))) ||
(zcbor_list_map_end_force_encode(state), false)) &&
zcbor_list_end_encode(state, 2))));

if (!tmp_result) {
zcbor_trace_file(state);
zcbor_log("%s error: %s\r\n", __func__, zcbor_error_str(zcbor_peek_error(state)));
} else {
zcbor_log("%s success\r\n", __func__);
}
bool res = (((zcbor_list_start_encode(state, 2) &&
((((zcbor_int32_encode(state, (&(*input).echo_service_rsp_ret)))) &&
((zcbor_tstr_encode(state, (&(*input).echo_service_rsp_str_out))))) ||
(zcbor_list_map_end_force_encode(state), false)) &&
zcbor_list_end_encode(state, 2))));

return tmp_result;
log_result(state, res, __func__);
return res;
}

static bool encode_echo_service_req(zcbor_state_t *state, const struct zcbor_string *input)
{
zcbor_log("%s\r\n", __func__);

bool tmp_result = (((zcbor_list_start_encode(state, 1) &&
((((zcbor_tstr_encode(state, (&(*input)))))) ||
(zcbor_list_map_end_force_encode(state), false)) &&
zcbor_list_end_encode(state, 1))));

if (!tmp_result) {
zcbor_trace_file(state);
zcbor_log("%s error: %s\r\n", __func__, zcbor_error_str(zcbor_peek_error(state)));
} else {
zcbor_log("%s success\r\n", __func__);
}
bool res = (((zcbor_list_start_encode(state, 1) &&
((((zcbor_tstr_encode(state, (&(*input)))))) ||
(zcbor_list_map_end_force_encode(state), false)) &&
zcbor_list_end_encode(state, 1))));

return tmp_result;
log_result(state, res, __func__);
return res;
}

int cbor_encode_echo_service_req(uint8_t *payload, size_t payload_len,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
/*
* Copyright (c) 2024 Nordic Semiconductor ASA
* Copyright (c) 2025 Nordic Semiconductor ASA
*
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
*/

/*
* Generated using zcbor version 0.8.1
* Generated using zcbor version 0.9.0
* https://github.com/NordicSemiconductor/zcbor
* Generated with a --default-max-qty of 3
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
/*
* Copyright (c) 2024 Nordic Semiconductor ASA
* Copyright (c) 2025 Nordic Semiconductor ASA
*
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
*/

/*
* Generated using zcbor version 0.8.1
* Generated using zcbor version 0.9.0
* https://github.com/NordicSemiconductor/zcbor
* Generated with a --default-max-qty of 3
*/
Expand Down
2 changes: 1 addition & 1 deletion subsys/sdfw_services/services/psa_crypto/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
service_name = PSA_CRYPTO
service_default_enabled = n
service_id = 0x71
service_version = 1
service_version = 2
service_buffer_size = 128
service_name_str = PSA Crypto
rsource "../Kconfig.template.service"
Loading
Loading