Fix warnings on PSA secure builds

pull/10407/head
Oren Cohen 2019-04-15 18:47:41 +03:00
parent 94898a12ab
commit f51eb6215a
7 changed files with 12 additions and 6 deletions

View File

@ -27,8 +27,8 @@
#include "psa_manifest/sid.h" #include "psa_manifest/sid.h"
#if defined(TARGET_TFM) #if defined(TARGET_TFM)
#include "psa/service.h"
#define MBED_CONF_SPM_IPC_MAX_NUM_OF_CHANNELS TFM_CONN_HANDLE_MAX_NUM #define MBED_CONF_SPM_IPC_MAX_NUM_OF_CHANNELS TFM_CONN_HANDLE_MAX_NUM
#define PSA_MAX_IOVEC 4
#endif #endif
using namespace utest::v1; using namespace utest::v1;

View File

@ -28,7 +28,7 @@
#include "psa_manifest/sid.h" #include "psa_manifest/sid.h"
#if defined(TARGET_TFM) #if defined(TARGET_TFM)
#include "psa/service.h" #define PSA_MAX_IOVEC 4
#endif #endif
using namespace utest::v1; using namespace utest::v1;

View File

@ -29,7 +29,7 @@
#include "psa_manifest/sid.h" #include "psa_manifest/sid.h"
#if defined(TARGET_TFM) #if defined(TARGET_TFM)
#include "psa/service.h" #define PSA_MAX_IOVEC 4
#endif #endif
using namespace utest::v1; using namespace utest::v1;

View File

@ -18,6 +18,7 @@
#if defined(TARGET_TFM) #if defined(TARGET_TFM)
#include "interface/include/psa_service.h" #include "interface/include/psa_service.h"
#include "secure_fw/core/ipc/include/tfm_utils.h"
#define SPM_PANIC(format, ...) tfm_panic() #define SPM_PANIC(format, ...) tfm_panic()
#elif defined(TARGET_MBED_SPM) #elif defined(TARGET_MBED_SPM)

View File

@ -17,6 +17,7 @@
*/ */
#include <stdint.h> #include <stdint.h>
#include <stdlib.h>
#include <string.h> #include <string.h>
#include <stddef.h> #include <stddef.h>
#include "tfm_plat_boot_seed.h" #include "tfm_plat_boot_seed.h"
@ -154,7 +155,7 @@ enum psa_attest_err_t attest_get_caller_client_id(int32_t *caller_id)
/* Boot seed data is part of bootloader status*/ /* Boot seed data is part of bootloader status*/
enum tfm_plat_err_t tfm_plat_get_boot_seed(uint32_t size, uint8_t *buf) enum tfm_plat_err_t tfm_plat_get_boot_seed(uint32_t size, uint8_t *buf)
{ {
return PSA_ATTEST_ERR_CLAIM_UNAVAILABLE; return (enum tfm_plat_err_t)PSA_ATTEST_ERR_CLAIM_UNAVAILABLE;
} }
/** /**
@ -181,13 +182,13 @@ enum tfm_plat_err_t tfm_plat_get_instance_id(uint32_t *size, uint8_t *buf)
/* HW version data is part of bootloader status*/ /* HW version data is part of bootloader status*/
enum tfm_plat_err_t tfm_plat_get_hw_version(uint32_t *size, uint8_t *buf) enum tfm_plat_err_t tfm_plat_get_hw_version(uint32_t *size, uint8_t *buf)
{ {
return PSA_ATTEST_ERR_CLAIM_UNAVAILABLE; return (enum tfm_plat_err_t)PSA_ATTEST_ERR_CLAIM_UNAVAILABLE;
} }
enum tfm_plat_err_t tfm_plat_get_implementation_id(uint32_t *size, uint8_t *buf) enum tfm_plat_err_t tfm_plat_get_implementation_id(uint32_t *size, uint8_t *buf)
{ {
memcpy(buf, impl_id_data, *size); memcpy(buf, impl_id_data, *size);
return PSA_ATTEST_ERR_SUCCESS; return (enum tfm_plat_err_t)PSA_ATTEST_ERR_SUCCESS;
} }
/* Temporary Implementation of security lifecycle data: mandatory claim. /* Temporary Implementation of security lifecycle data: mandatory claim.

View File

@ -25,6 +25,7 @@
#include "psa_attest_inject_key.h" #include "psa_attest_inject_key.h"
#include "psa_inject_attestation_key_impl.h" #include "psa_inject_attestation_key_impl.h"
#include "attestation.h" #include "attestation.h"
#include <stdlib.h>
#include <string.h> #include <string.h>
#include "psa/crypto.h" #include "psa/crypto.h"

View File

@ -15,6 +15,7 @@
* limitations under the License. * limitations under the License.
*/ */
#include <stdlib.h>
#include <string.h> #include <string.h>
#include "psa/client.h" #include "psa/client.h"
#include "psa/service.h" #include "psa/service.h"
@ -25,6 +26,8 @@
#if defined(TARGET_MBED_SPM) #if defined(TARGET_MBED_SPM)
#include "kv_config.h" #include "kv_config.h"
#else
int kv_init_storage_config();
#endif #endif
#ifdef __cplusplus #ifdef __cplusplus