Skip to content

Commit ca887a9

Browse files
authored
Merge pull request ARMmbed#10407 from kfnta/warn_fix
Fix warnings on PSA secure builds
2 parents 658a41c + f51eb62 commit ca887a9

File tree

7 files changed

+12
-6
lines changed

7 files changed

+12
-6
lines changed

TESTS/psa/spm_client/COMPONENT_NSPE/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@
2727
#include "psa_manifest/sid.h"
2828

2929
#if defined(TARGET_TFM)
30-
#include "psa/service.h"
3130
#define MBED_CONF_SPM_IPC_MAX_NUM_OF_CHANNELS TFM_CONN_HANDLE_MAX_NUM
31+
#define PSA_MAX_IOVEC 4
3232
#endif
3333

3434
using namespace utest::v1;

TESTS/psa/spm_server/COMPONENT_NSPE/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
#include "psa_manifest/sid.h"
2929

3030
#if defined(TARGET_TFM)
31-
#include "psa/service.h"
31+
#define PSA_MAX_IOVEC 4
3232
#endif
3333

3434
using namespace utest::v1;

TESTS/psa/spm_smoke/COMPONENT_NSPE/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
#include "psa_manifest/sid.h"
3030

3131
#if defined(TARGET_TFM)
32-
#include "psa/service.h"
32+
#define PSA_MAX_IOVEC 4
3333
#endif
3434

3535
using namespace utest::v1;

components/TARGET_PSA/inc/psa/service.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
#if defined(TARGET_TFM)
1919

2020
#include "interface/include/psa_service.h"
21+
#include "secure_fw/core/ipc/include/tfm_utils.h"
2122
#define SPM_PANIC(format, ...) tfm_panic()
2223

2324
#elif defined(TARGET_MBED_SPM)

components/TARGET_PSA/services/attestation/COMPONENT_PSA_SRV_IMPL/attest_iat_claims_loader.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
*/
1818

1919
#include <stdint.h>
20+
#include <stdlib.h>
2021
#include <string.h>
2122
#include <stddef.h>
2223
#include "tfm_plat_boot_seed.h"
@@ -154,7 +155,7 @@ enum psa_attest_err_t attest_get_caller_client_id(int32_t *caller_id)
154155
/* Boot seed data is part of bootloader status*/
155156
enum tfm_plat_err_t tfm_plat_get_boot_seed(uint32_t size, uint8_t *buf)
156157
{
157-
return PSA_ATTEST_ERR_CLAIM_UNAVAILABLE;
158+
return (enum tfm_plat_err_t)PSA_ATTEST_ERR_CLAIM_UNAVAILABLE;
158159
}
159160

160161
/**
@@ -181,13 +182,13 @@ enum tfm_plat_err_t tfm_plat_get_instance_id(uint32_t *size, uint8_t *buf)
181182
/* HW version data is part of bootloader status*/
182183
enum tfm_plat_err_t tfm_plat_get_hw_version(uint32_t *size, uint8_t *buf)
183184
{
184-
return PSA_ATTEST_ERR_CLAIM_UNAVAILABLE;
185+
return (enum tfm_plat_err_t)PSA_ATTEST_ERR_CLAIM_UNAVAILABLE;
185186
}
186187

187188
enum tfm_plat_err_t tfm_plat_get_implementation_id(uint32_t *size, uint8_t *buf)
188189
{
189190
memcpy(buf, impl_id_data, *size);
190-
return PSA_ATTEST_ERR_SUCCESS;
191+
return (enum tfm_plat_err_t)PSA_ATTEST_ERR_SUCCESS;
191192
}
192193

193194
/* Temporary Implementation of security lifecycle data: mandatory claim.

components/TARGET_PSA/services/attestation/COMPONENT_SPE/psa_attestation_partition.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
#include "psa_attest_inject_key.h"
2626
#include "psa_inject_attestation_key_impl.h"
2727
#include "attestation.h"
28+
#include <stdlib.h>
2829
#include <string.h>
2930
#include "psa/crypto.h"
3031

components/TARGET_PSA/services/storage/its/COMPONENT_SPE/its_partition.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
* limitations under the License.
1616
*/
1717

18+
#include <stdlib.h>
1819
#include <string.h>
1920
#include "psa/client.h"
2021
#include "psa/service.h"
@@ -25,6 +26,8 @@
2526

2627
#if defined(TARGET_MBED_SPM)
2728
#include "kv_config.h"
29+
#else
30+
int kv_init_storage_config();
2831
#endif
2932

3033
#ifdef __cplusplus

0 commit comments

Comments
 (0)