Doc: fix doxygen comments.
Some existing doxygen comments resulted in bad or bad looking
documentation. These were fixed.
Change-Id: I20ab5a81c54d3bdc0e056965ad7de293d472cdf9
Signed-off-by: Gyorgy Szing <Gyorgy.Szing@arm.com>
diff --git a/secure_fw/services/audit_logging/audit_core.h b/secure_fw/services/audit_logging/audit_core.h
index fb7d89f..d41cc7c 100644
--- a/secure_fw/services/audit_logging/audit_core.h
+++ b/secure_fw/services/audit_logging/audit_core.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2018, Arm Limited. All rights reserved.
+ * Copyright (c) 2018-2019, Arm Limited. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*
@@ -26,32 +26,15 @@
* \details This can't be represented as a
* structure because the payload
* is of variable size, i.e.
- *
- * +-------------+0
- * | TIMESTAMP |
- * | |
- * +-------------+8
- * | IV_COUNTER |
- * | |
- * +-------------+12
- * | PARTITION ID|
- * | |
- * +-------------+16
- * | SIZE |
- * | |
- * +-------------+20
- * | RECORD_ID |
- * | |
- * +-------------+24
- * | PAYLOAD |
- * | |
- * | |
- * | |
- * +-------------+20 + SIZE
- * | MAC |
- * | |
- * | |
- * +-------------+20 + SIZE + MAC_SIZE
+ * |Offset |Name |
+ * |-------|------------|
+ * | 0 |TIMESTAMP |
+ * | 8 |IV_COUNTER |
+ * |12 |PARTITION ID|
+ * |16 |SIZE |
+ * |20 |RECORD ID |
+ * |24 |PAYLOAD |
+ * |20+SIZE|MAC |
*
* SIZE: at least LOG_MIN_SIZE bytes, known only at runtime. It's the size of
* the (RECORD_ID, PAYLOAD) fields
diff --git a/secure_fw/services/crypto/crypto_engine.h b/secure_fw/services/crypto/crypto_engine.h
index c5771bf..6263aae 100644
--- a/secure_fw/services/crypto/crypto_engine.h
+++ b/secure_fw/services/crypto/crypto_engine.h
@@ -138,7 +138,7 @@
/**
* \brief This function starts a multipart hash operation on the crypto engine
*
- * \param[in/out] hp Pointer to the hash engine context to be used
+ * \param[in,out] hp Pointer to the hash engine context to be used
* \param[in] engine_info Pointer to the engine_info structure as determined
* during the setup step
*
@@ -150,7 +150,7 @@
* \brief This function updates a multipart hash operation with one chunk of
* input data
*
- * \param[in/out] hp Pointer to the hash engine context to be used
+ * \param[in,out] hp Pointer to the hash engine context to be used
* \param[in] input Pointer to the buffer containing the input data
* \param[in] input_length Size in bytes of the input data
*
@@ -163,7 +163,7 @@
* \brief This function finalises a multipart hash operation producing one hash
* value in output as described by the operation context
*
- * \param[in/out] hp Pointer to the hash engine context to be used
+ * \param[in,out] hp Pointer to the hash engine context to be used
* \param[out] hash Pointer to the buffer containing the output hash value
*
* \return Return values as specified by \ref psa_status_t
@@ -174,7 +174,7 @@
* \brief This function releases the crypto engine resources associated to a
* multipart hash operation context
*
- * \param[in/out] hp Pointer to the hash engine context to be used
+ * \param[in,out] hp Pointer to the hash engine context to be used
*
* \return Return values as specified by \ref psa_status_t
*/
@@ -204,7 +204,7 @@
* \brief This function sets the padding mode on the crypto engine based on the
* information gathered during the setup phase
*
- * \param[in/out] cp Pointer to the cipher engine context to be used
+ * \param[in,out] cp Pointer to the cipher engine context to be used
* \param[in] engine_info Pointer to the engine configuration structure
* containing engine parameters determined during
* setup
@@ -217,7 +217,7 @@
/**
* \brief This function starts a multipart cipher operation
*
- * \param[in/out] cp Pointer to the cipher engine context to be used
+ * \param[in,out] cp Pointer to the cipher engine context to be used
* \param[in] engine_info Pointer to the engine configuration structure
* containing engine parameters determined during
* setup
@@ -233,7 +233,7 @@
* item to determine if the key needs to be set in encryption or
* decryption mode on the engine.
*
- * \param[in/out] cp Pointer to the cipher engine context to be used
+ * \param[in,out] cp Pointer to the cipher engine context to be used
* \param[in] key_data Pointer to the buffer containing key material
* \param[in] key_size Size in bytes of the key pointed by key_data
* \param[in] engine_info Pointer to the engine configuration structure
@@ -251,7 +251,7 @@
* \brief This function sets the initialisation vector on the crypto engine for
* a multipart cipher operation
*
- * \param[in/out] cp Pointer to the cipher engine context to be used
+ * \param[in,out] cp Pointer to the cipher engine context to be used
* \param[in] iv Pointer to the buffer containing the IV
* \param[in] iv_length Size in bytes of the initialisation vector
*
@@ -264,7 +264,7 @@
* \brief This function updates a multipart cipher operation on the crypto
* engine with a new chunk of input data. It may produce output data.
*
- * \param[in/out] cp Pointer to the cipher engine context to be used
+ * \param[in,out] cp Pointer to the cipher engine context to be used
* \param[in] input Pointer to the buffer containing the input data
* chunk
* \param[in] input_length Size in bytes of the input data chunk
@@ -283,7 +283,7 @@
* \brief This function finalises a multipart cipher operation on the crypto
* engine. It may produce output data.
*
- * \param[in/out] cp Pointer to the cipher engine context to be used
+ * \param[in,out] cp Pointer to the cipher engine context to be used
* \param[out] output Pointer to the buffer containing the output data
* \param[out] output_length Pointer to the size in bytes of the data produced
* as output
@@ -297,7 +297,7 @@
* \brief This function releases the crypto engine resources associated to a
* multipart cipher operation context
*
- * \param[in/out] cp Pointer to the cipher engine context to be used
+ * \param[in,out] cp Pointer to the cipher engine context to be used
*
* \return Return values as specified by \ref psa_status_t
*/
diff --git a/secure_fw/services/crypto/tfm_crypto_api.h b/secure_fw/services/crypto/tfm_crypto_api.h
index f3ea31a..23bcda1 100644
--- a/secure_fw/services/crypto/tfm_crypto_api.h
+++ b/secure_fw/services/crypto/tfm_crypto_api.h
@@ -321,7 +321,7 @@
* decrypt a chunk of encrypted input data to obtain decrypted data
* (for decryption contexts)
*
- * \param[in/out] operation Cipher operation context
+ * \param[in,out] operation Cipher operation context
* \param[in] input Buffer containing input data
* \param[in] input_length Input length
* \param[out] output Buffer containing output data
@@ -344,7 +344,7 @@
* \note A successful call to this function de-initialises the cipher operation
* context provided as parameter
*
- * \param[in/out] operation Cipher operation context
+ * \param[in,out] operation Cipher operation context
* \param[out] output Buffer containing output data
* \param[in] output_size Size of the output buffer
* \param[out] output_length Size of the produced output
@@ -362,7 +362,7 @@
* \note A successful call to this function de-initialises the cipher operation
* context provided as parameter
*
- * \param[in/out] operation Cipher operation context
+ * \param[in,out] operation Cipher operation context
*
* \return Return values as described in \ref tfm_crypto_err_t
*/
@@ -400,7 +400,7 @@
* \note A successful call to this function de-initialises the hash operation
* context provided as parameter
*
- * \param[in/out] operation Hash operation context
+ * \param[in,out] operation Hash operation context
* \param[out] hash Buffer containing hash data
* \param[in] hash_size Size of the hash buffer
* \param[out] hash_length Size of the produced hash
@@ -419,7 +419,7 @@
* context provided as parameter. The hash operation is de-initialised
* also in case TFM_CRYPTO_ERR_PSA_ERROR_INVALID_SIGNATURE is returned
*
- * \param[in/out] operation Hash operation context
+ * \param[in,out] operation Hash operation context
* \param[in] hash Buffer containing the provided hash value
* \param[in] hash_length Size of the provided hash value
*
@@ -434,7 +434,7 @@
* \note A successful call to this function de-initialises the hash operation
* context provided as parameter
*
- * \param[in/out] operation Hash operation context
+ * \param[in,out] operation Hash operation context
*
* \return Return values as described in \ref tfm_crypto_err_t
*/
@@ -487,7 +487,7 @@
/**
* \brief Finalise a MAC context operation producing the final MAC value
*
- * \param[in/out] operation Mac operation context
+ * \param[in,out] operation Mac operation context
* \param[out] mac Buffer containing MAC data
* \param[in] mac_size Size of the mac buffer
* \param[out] mac_length Size of the produced mac
@@ -502,7 +502,7 @@
* \brief Finalise a MAC context operation, verifying that the final MAC value
* matches the one provided as input
*
- * \param[in/out] operation MAC operation context
+ * \param[in,out] operation MAC operation context
* \param[in] mac Buffer containing the provided MAC value
* \param[in] mac_length Size of the provided MAC value
*
@@ -515,7 +515,7 @@
/**
* \brief Abort a MAC operation, clear the operation context provided
*
- * \param[in/out] operation MAC operation context
+ * \param[in,out] operation MAC operation context
*
* \return Return values as described in \ref tfm_crypto_err_t
*/
diff --git a/secure_fw/services/initial_attestation/attestation.h b/secure_fw/services/initial_attestation/attestation.h
index 84e1b66..404fb41 100644
--- a/secure_fw/services/initial_attestation/attestation.h
+++ b/secure_fw/services/initial_attestation/attestation.h
@@ -76,7 +76,7 @@
* \param[in] in_vec Pointer to in_vec array, which contains input data
* to attestation service
* \param[in] num_invec Number of elements in in_vec array
- * \param[in/out] out_vec Pointer out_vec array, which contains output data
+ * \param[in,out] out_vec Pointer out_vec array, which contains output data
* to attestation service
* \param[in] num_outvec Number of elements in out_vec array
*
diff --git a/secure_fw/services/secure_storage/flash_fs/sst_flash_fs_mblock.c b/secure_fw/services/secure_storage/flash_fs/sst_flash_fs_mblock.c
index 57eecd2..481528e 100644
--- a/secure_fw/services/secure_storage/flash_fs/sst_flash_fs_mblock.c
+++ b/secure_fw/services/secure_storage/flash_fs/sst_flash_fs_mblock.c
@@ -80,7 +80,7 @@
(SST_METADATA_BLOCK1) : (SST_METADATA_BLOCK0))
/*!
- * \enum sst_metadata_block_header_t
+ * \struct sst_metadata_block_header_t
*
* \brief Structure to store the metadata block header.
*
@@ -97,7 +97,7 @@
};
/*!
- * \enum sst_flash_fs_context_t
+ * \struct sst_flash_fs_context_t
*
* \brief Structure to store the flash file system context.
*
@@ -593,7 +593,7 @@
/**
* \brief Checks the validity of FS version.
*
- * \param[in] swap_count Swap count to validate
+ * \param[in] fs_version File system version.
*
* \return Returns error code as specified in \ref tfm_sst_err_t
*/
diff --git a/secure_fw/services/secure_storage/flash_fs/sst_flash_fs_mblock.h b/secure_fw/services/secure_storage/flash_fs/sst_flash_fs_mblock.h
index 61b705b..ce7795a 100644
--- a/secure_fw/services/secure_storage/flash_fs/sst_flash_fs_mblock.h
+++ b/secure_fw/services/secure_storage/flash_fs/sst_flash_fs_mblock.h
@@ -92,7 +92,7 @@
/**
* \brief Gets current scratch datablock physical ID.
*
- * \prama[in] lblock Logical block number
+ * \param[in] lblock Logical block number
*
* \return current scratch data block
*/
@@ -156,11 +156,11 @@
/**
* \brief Reserves space for a file.
*
- * \param[in] file_id File ID
- * \param[in] size Size of the file for which space is reserve
- * \param[out] idx File metadata entry index
- * \param[out] file_meta File metadata entry
- * \param[out] block_meta Block metadata entry
+ * \param[in] file_id File ID
+ * \param[in] size Size of the file for which space is reserve
+ * \param[out] file_meta_idx File metadata entry index
+ * \param[out] file_meta File metadata entry
+ * \param[out] block_meta Block metadata entry
*
* \return Returns error code as specified in \ref tfm_sst_err_t
*/
diff --git a/secure_fw/services/secure_storage/sst_encrypted_object.c b/secure_fw/services/secure_storage/sst_encrypted_object.c
index dd97dd1..1c0eec1 100644
--- a/secure_fw/services/secure_storage/sst_encrypted_object.c
+++ b/secure_fw/services/secure_storage/sst_encrypted_object.c
@@ -58,7 +58,7 @@
*
* \param[in] fid File ID
* \param[in] cur_size Size of the object data to decrypt
- * \param[in/out] obj Pointer to the object structure to authenticate and
+ * \param[in,out] obj Pointer to the object structure to authenticate and
* fill in with the decrypted data. The tag of the object
* is the one stored in the object table for the given
* File ID.
diff --git a/secure_fw/services/secure_storage/sst_encrypted_object.h b/secure_fw/services/secure_storage/sst_encrypted_object.h
index ace6200..c3292d5 100644
--- a/secure_fw/services/secure_storage/sst_encrypted_object.h
+++ b/secure_fw/services/secure_storage/sst_encrypted_object.h
@@ -32,7 +32,7 @@
* sst_object_t structure data.
*
* \param[in] fid File ID
- * \param[in/out] obj Pointer to the object structure to write.
+ * \param[in,out] obj Pointer to the object structure to write.
*
* Note: The function will use obj to store the encrypted data before write it
* into the flash to reduce the memory requirements and the number of
diff --git a/secure_fw/services/secure_storage/sst_object_table.c b/secure_fw/services/secure_storage/sst_object_table.c
index a3fbff9..f363827 100644
--- a/secure_fw/services/secure_storage/sst_object_table.c
+++ b/secure_fw/services/secure_storage/sst_object_table.c
@@ -248,7 +248,7 @@
/**
* \brief Writes object table in persistent memory.
*
- * \param[in/out] obj_table Pointer to the object table to generate
+ * \param[in,out] obj_table Pointer to the object table to generate
* authentication
*
* \return Returns error code as specified in \ref tfm_sst_err_t
@@ -348,7 +348,7 @@
* \brief Generates table authentication tag.
*
* \param[in] nvc_1 Value of SST non-volatile counter 1
- * \param[in/out] obj_table Pointer to the object table to generate
+ * \param[in,out] obj_table Pointer to the object table to generate
* authentication
*
* \return Returns error code as specified in \ref tfm_sst_err_t
@@ -377,7 +377,7 @@
* \brief Authenticates table of objects.
*
* \param[in] table_idx Table index in the init context
- * \param[in/out] init_ctx Pointer to the object table to authenticate
+ * \param[in,out] init_ctx Pointer to the object table to authenticate
*
*/
static void sst_object_table_authenticate(uint8_t table_idx,
@@ -420,7 +420,7 @@
/**
* \brief Authenticates tables of objects.
*
- * \param[in/out] init_ctx Pointer to the object table to authenticate
+ * \param[in,out] init_ctx Pointer to the object table to authenticate
*
* \return Returns error code as specified in \ref tfm_sst_err_t
*/
@@ -474,7 +474,7 @@
/**
* \brief Generates table authentication
*
- * \param[in/out] obj_table Pointer to the object table to generate
+ * \param[in,out] obj_table Pointer to the object table to generate
* authentication
*
* \return Returns error code as specified in \ref tfm_sst_err_t
@@ -496,7 +496,7 @@
/**
* \brief Authenticates tables of objects.
*
- * \param[in/out] init_ctx Pointer to the object table to authenticate
+ * \param[in,out] init_ctx Pointer to the object table to authenticate
*
*/
__attribute__ ((always_inline))
@@ -535,7 +535,7 @@
/**
* \brief Saves object table in the persistent memory.
*
- * \param[in/out] obj_table Pointer to the object table to save
+ * \param[in,out] obj_table Pointer to the object table to save
*
* \return Returns error code as specified in \ref tfm_sst_err_t
*/
@@ -609,7 +609,7 @@
/**
* \brief Checks the validity of the table version.
*
- * \param[in/out] init_ctx Pointer to the init object table context
+ * \param[in,out] init_ctx Pointer to the init object table context
*
*/
__attribute__ ((always_inline))
diff --git a/secure_fw/services/secure_storage/sst_object_table.h b/secure_fw/services/secure_storage/sst_object_table.h
index 7d08667..1d686b8 100644
--- a/secure_fw/services/secure_storage/sst_object_table.h
+++ b/secure_fw/services/secure_storage/sst_object_table.h
@@ -41,7 +41,7 @@
/**
* \brief Initializes object table.
*
- * \param[in/out] obj_data Pointer to the static object data allocated
+ * \param[in,out] obj_data Pointer to the static object data allocated
* in other to reuse that memory to allocated a
* temporary object table.
*
diff --git a/secure_fw/spm/spm_api.h b/secure_fw/spm/spm_api.h
index 5f20e48..0fa4c86 100644
--- a/secure_fw/spm/spm_api.h
+++ b/secure_fw/spm/spm_api.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017-2018, Arm Limited. All rights reserved.
+ * Copyright (c) 2017-2019, Arm Limited. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*
@@ -180,7 +180,7 @@
*
* \note This function doesn't check if partition_idx is valid.
*/
-void tfm_spm_partition_set_stack(uint32_t partition_id, uint32_t stack_ptr);
+void tfm_spm_partition_set_stack(uint32_t partition_idx, uint32_t stack_ptr);
#endif
/**
@@ -244,7 +244,7 @@
* \param[in] state The state to be set
*
* \note This function doesn't check if partition_idx is valid.
- * \note The \ref state has to have the value set of \ref spm_part_state_t.
+ * \note The state has to have the value set of \ref spm_part_state_t.
*/
void tfm_spm_partition_set_state(uint32_t partition_idx, uint32_t state);
diff --git a/secure_fw/spm/spm_db_setup.h b/secure_fw/spm/spm_db_setup.h
index e1c53d2..f4102cf1 100644
--- a/secure_fw/spm/spm_db_setup.h
+++ b/secure_fw/spm/spm_db_setup.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2018, Arm Limited. All rights reserved.
+ * Copyright (c) 2018-2019, Arm Limited. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*
@@ -17,10 +17,10 @@
* Gets the index of a partition in the partition db based on the partition ID
* provided as a parameter.
*
- * \param[in] partition_id The ID of the partition
+ * \param[in] partition_idx The index of the partition
*
- * \return \ref INVALID_PARTITION_IDX if the provided ID is invalid. The index
- * of the partition otherwise.
+ * \return \ref INVALID_PARTITION_IDX if the provided index is invalid. The
+ * index of the partition otherwise.
*/
uint32_t get_partition_idx(uint32_t partition_id);