Skip to content
Open
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
8 changes: 2 additions & 6 deletions api/stse_data_storage.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,15 @@ stse_ReturnCode_t stse_data_storage_get_partitioning_table(
stse_Handler_t *pSTSE,
PLAT_UI8 total_partition_count,
stsafea_data_partition_record_t *pPartitioning_table,
PLAT_UI16 Partitioning_table_length) {
PLAT_UI16 partitioning_table_size) {

stse_ReturnCode_t ret = STSE_API_INCOMPATIBLE_DEVICE_TYPE;

#ifdef STSE_CONF_STSAFE_A_SUPPORT
#ifdef STSE_CONF_STSAFE_L_SUPPORT
if (pSTSE->device_type != STSAFE_L010) {
#endif /* STSE_CONF_STSAFE_L_SUPPORT */
ret = stsafea_get_data_partitions_configuration(pSTSE, total_partition_count, pPartitioning_table, Partitioning_table_length);
ret = stsafea_get_data_partitions_configuration(pSTSE, total_partition_count, pPartitioning_table, partitioning_table_size);
#ifdef STSE_CONF_STSAFE_L_SUPPORT
}
#endif /* STSE_CONF_STSAFE_L_SUPPORT */
Expand Down Expand Up @@ -111,7 +111,6 @@ stse_ReturnCode_t stse_data_storage_read_data_zone(
case STSAFE_A100:
case STSAFE_A110:
case STSAFE_A120:
case STSAFE_A200:
ret = stsafea_read_data_zone(
pSTSE,
zone,
Expand Down Expand Up @@ -181,7 +180,6 @@ stse_ReturnCode_t stse_data_storage_update_data_zone(
case STSAFE_A100:
case STSAFE_A110:
case STSAFE_A120:
case STSAFE_A200:
ret = stsafea_update_data_zone(
pSTSE,
zone,
Expand Down Expand Up @@ -242,7 +240,6 @@ stse_ReturnCode_t stse_data_storage_decrement_counter_zone(
case STSAFE_A100:
case STSAFE_A110:
case STSAFE_A120:
case STSAFE_A200:
ret = stsafea_decrement_counter_zone(
pSTSE,
zone,
Expand Down Expand Up @@ -315,7 +312,6 @@ stse_ReturnCode_t stse_data_storage_read_counter_zone(
case STSAFE_A100:
case STSAFE_A110:
case STSAFE_A120:
case STSAFE_A200:
ret = stsafea_read_counter_zone(
pSTSE,
zone,
Expand Down
4 changes: 2 additions & 2 deletions api/stse_data_storage.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,15 @@ stse_ReturnCode_t stse_data_storage_get_total_partition_count(
* \param[in] pSTSE Pointer to target STSE handler
* \param[in] total_partition_count Total partition count
* \param[out] pPartitioning_table Pointer to the partition table buffer
* \param[in] Partitioning_table_length Length of the partition table to be received
* \param[in] partitioning_table_size Size (in bytes) of the partition table (@p pPartitioning_table) to be received
* \return \ref STSE_OK on success ; \ref stse_ReturnCode_t error code otherwise
* \details \include{doc} stse_data_storage_get_partitioning_table.dox
*/
stse_ReturnCode_t stse_data_storage_get_partitioning_table(
stse_Handler_t *pSTSE,
PLAT_UI8 total_partition_count,
stsafea_data_partition_record_t *pPartitioning_table,
PLAT_UI16 Partitioning_table_length);
PLAT_UI16 partitioning_table_size);

/*!
* \brief Read one memory zone of the STSE device
Expand Down
4 changes: 0 additions & 4 deletions api/stse_device_management.c
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,6 @@ stse_ReturnCode_t stse_device_enter_hibernate(stse_Handler_t *pSTSE,
#ifdef STSE_CONF_STSAFE_A_SUPPORT
case STSAFE_A100:
case STSAFE_A110:
case STSAFE_A200:
ret = stsafea_hibernate(pSTSE, wake_up_mode);
break;
case STSAFE_A120:
Expand Down Expand Up @@ -156,7 +155,6 @@ stse_ReturnCode_t stse_device_power_on(stse_Handler_t *pSTSE) {
case STSAFE_A100:
case STSAFE_A110:
case STSAFE_A120:
case STSAFE_A200:
stse_platform_Delay_ms(stsafea_boot_time[pSTSE->device_type]);
break;
#endif /* STSE_CONF_STSAFE_A_SUPPORT */
Expand Down Expand Up @@ -202,7 +200,6 @@ stse_ReturnCode_t stse_device_echo(stse_Handler_t *pSTSE, PLAT_UI8 *pIn, PLAT_UI
case STSAFE_A100:
case STSAFE_A110:
case STSAFE_A120:
case STSAFE_A200:
return stsafea_echo(pSTSE, pIn, pOut, size);
#endif /* STSE_CONF_STSAFE_A_SUPPORT */
default:
Expand Down Expand Up @@ -317,7 +314,6 @@ stse_ReturnCode_t stse_device_reset(stse_Handler_t *pSTSE) {
case STSAFE_A100:
case STSAFE_A110:
case STSAFE_A120:
case STSAFE_A200:
ret = stsafea_reset(pSTSE);
break;
#endif /* STSE_CONF_STSAFE_A_SUPPORT */
Expand Down
1 change: 0 additions & 1 deletion api/stse_ecc.c
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ stse_ReturnCode_t stse_ecc_generate_signature(
case STSAFE_A100:
case STSAFE_A110:
case STSAFE_A120:
case STSAFE_A200:
ret = stsafea_ecc_generate_signature(pSTSE, slot_number, key_type, pMessage, message_length, pSignature);
break;
#endif /* STSE_CONF_STSAFE_A_SUPPORT */
Expand Down
1 change: 0 additions & 1 deletion core/stse_device.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ typedef enum stse_device_t {
STSAFE_A100, /*!< STSAFE-A100 target device */
STSAFE_A110, /*!< STSAFE-A110 target device */
STSAFE_A120, /*!< STSAFE-A120 target device */
STSAFE_A200, /*!< STSAFE-A200 target device */
#endif /* STSE_CONF_STSAFE_A_SUPPORT */
#ifdef STSE_CONF_STSAFE_L_SUPPORT
STSAFE_L010 /*!< STSAFE-L010 target device */
Expand Down
2 changes: 2 additions & 0 deletions core/stse_return_codes.h
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,8 @@ enum stse_ReturnCode_t {
STSE_CERT_INVALID_CERTIFICATE,
STSE_CERT_CA_NOT_MATCHING,
STSE_CERT_UNSUPPORTED_FEATURE,

__STSE_SIGNED = -1 // Used to make the type of this enum a signed integer, don't use.
};

typedef enum stse_ReturnCode_t stse_ReturnCode_t;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ Following diagram illustrates the interactions performed between the Host and th
stse_ret = stse_data_storage_get_partitioning_table(
&stse_handler,
total_zone_count,
data_partition_record_table
data_partition_record_table,
sizeof(data_partition_record_table)
);
if(stse_ret != STSE_OK )
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ Following diagram illustrates the interactions performed between the Host and th
stse_ret = stse_data_storage_get_partitioning_table(
&stse_handler,
total_zone_count,
data_partition_record_table
data_partition_record_table,
sizeof(data_partition_record_table)
);
if(stse_ret != STSE_OK )
{
Expand Down
Loading