Skip to content

Commit 5022dda

Browse files
parmi93TofMassilia13320
authored andcommitted
[doc] clarify that partitioning table buffer size is measured in bytes
1 parent 8944fed commit 5022dda

6 files changed

Lines changed: 13 additions & 11 deletions

File tree

api/stse_data_storage.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,15 +43,15 @@ stse_ReturnCode_t stse_data_storage_get_partitioning_table(
4343
stse_Handler_t *pSTSE,
4444
PLAT_UI8 total_partition_count,
4545
stsafea_data_partition_record_t *pPartitioning_table,
46-
PLAT_UI16 Partitioning_table_length) {
46+
PLAT_UI16 partitioning_table_size) {
4747

4848
stse_ReturnCode_t ret = STSE_API_INCOMPATIBLE_DEVICE_TYPE;
4949

5050
#ifdef STSE_CONF_STSAFE_A_SUPPORT
5151
#ifdef STSE_CONF_STSAFE_L_SUPPORT
5252
if (pSTSE->device_type != STSAFE_L010) {
5353
#endif /* STSE_CONF_STSAFE_L_SUPPORT */
54-
ret = stsafea_get_data_partitions_configuration(pSTSE, total_partition_count, pPartitioning_table, Partitioning_table_length);
54+
ret = stsafea_get_data_partitions_configuration(pSTSE, total_partition_count, pPartitioning_table, partitioning_table_size);
5555
#ifdef STSE_CONF_STSAFE_L_SUPPORT
5656
}
5757
#endif /* STSE_CONF_STSAFE_L_SUPPORT */

api/stse_data_storage.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,15 +49,15 @@ stse_ReturnCode_t stse_data_storage_get_total_partition_count(
4949
* \param[in] pSTSE Pointer to target STSE handler
5050
* \param[in] total_partition_count Total partition count
5151
* \param[out] pPartitioning_table Pointer to the partition table buffer
52-
* \param[in] Partitioning_table_length Length of the partition table to be received
52+
* \param[in] partitioning_table_size Size (in bytes) of the partition table (@p pPartitioning_table) to be received
5353
* \return \ref STSE_OK on success ; \ref stse_ReturnCode_t error code otherwise
5454
* \details \include{doc} stse_data_storage_get_partitioning_table.dox
5555
*/
5656
stse_ReturnCode_t stse_data_storage_get_partitioning_table(
5757
stse_Handler_t *pSTSE,
5858
PLAT_UI8 total_partition_count,
5959
stsafea_data_partition_record_t *pPartitioning_table,
60-
PLAT_UI16 Partitioning_table_length);
60+
PLAT_UI16 partitioning_table_size);
6161

6262
/*!
6363
* \brief Read one memory zone of the STSE device

doc/resources/dox_files/APIs/data_storage/stse_data_storage_get_partitioning_table.dox

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@ Following diagram illustrates the interactions performed between the Host and th
4646
stse_ret = stse_data_storage_get_partitioning_table(
4747
&stse_handler,
4848
total_zone_count,
49-
data_partition_record_table
49+
data_partition_record_table,
50+
sizeof(data_partition_record_table)
5051
);
5152
if(stse_ret != STSE_OK )
5253
{

doc/resources/dox_files/APIs/data_storage/stse_data_storage_get_total_partition_count.dox

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@ Following diagram illustrates the interactions performed between the Host and th
4848
stse_ret = stse_data_storage_get_partitioning_table(
4949
&stse_handler,
5050
total_zone_count,
51-
data_partition_record_table
51+
data_partition_record_table,
52+
sizeof(data_partition_record_table)
5253
);
5354
if(stse_ret != STSE_OK )
5455
{

services/stsafea/stsafea_data_partition.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,13 +78,13 @@ stse_ReturnCode_t stsafea_get_total_partition_count(stse_Handler_t *pSTSE,
7878
stse_ReturnCode_t stsafea_get_data_partitions_configuration(stse_Handler_t *pSTSE,
7979
PLAT_UI8 total_partitions_count,
8080
stsafea_data_partition_record_t *pRecord_table,
81-
PLAT_UI16 record_table_length) {
81+
PLAT_UI16 record_table_size) {
8282
stse_ReturnCode_t ret;
8383
volatile PLAT_UI8 partition_idx;
8484
PLAT_UI8 cmd_header = STSAFEA_CMD_QUERY;
8585
PLAT_UI8 tag = STSAFEA_SUBJECT_TAG_DATA_PARTITION_CONFIGURATION;
8686
PLAT_UI8 rsp_header;
87-
PLAT_UI8 raw_data[record_table_length];
87+
PLAT_UI8 raw_data[record_table_size];
8888

8989
if (pSTSE == NULL) {
9090
return STSE_SERVICE_HANDLER_NOT_INITIALISED;
@@ -98,7 +98,7 @@ stse_ReturnCode_t stsafea_get_data_partitions_configuration(stse_Handler_t *pSTS
9898
/*- Create Rsp frame and populate elements*/
9999
stse_frame_allocate(RspFrame);
100100
stse_frame_element_allocate_push(&RspFrame, eRsp_header, 1, &rsp_header);
101-
stse_frame_element_allocate_push(&RspFrame, eRaw, record_table_length, raw_data);
101+
stse_frame_element_allocate_push(&RspFrame, eRaw, record_table_size, raw_data);
102102

103103
/*- Perform Transfer*/
104104
ret = stsafea_frame_raw_transfer(pSTSE,

services/stsafea/stsafea_data_partition.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,13 +113,13 @@ stse_ReturnCode_t stsafea_get_total_partition_count(stse_Handler_t *pSTSE,
113113
* \param[in] pSTSE Pointer to target SE handler
114114
* \param[in] total_partitions_count Total partition count in bytes
115115
* \param[in,out] pRecord_table Pointer to applicative partition record table
116-
* \param[in] record_table_length Applicative record table length
116+
* \param[in] record_table_size Applicative record table (@p pRecord_table) size (in bytes)
117117
* \return \ref STSE_OK on success ; \ref stse_ReturnCode_t error code otherwise
118118
*/
119119
stse_ReturnCode_t stsafea_get_data_partitions_configuration(stse_Handler_t *pSTSE,
120120
PLAT_UI8 total_partitions_count,
121121
stsafea_data_partition_record_t *pRecord_table,
122-
PLAT_UI16 record_table_length);
122+
PLAT_UI16 record_table_size);
123123

124124
/**
125125
* \brief Decrement counter zone

0 commit comments

Comments
 (0)