secure_fw: Fix spelling typos
Signed-off-by: Antonio de Angelis <antonio.deangelis@arm.com>
Change-Id: I58da18eb39f746c169e7e401d921b84e13d70345
diff --git a/secure_fw/CMakeLists.txt b/secure_fw/CMakeLists.txt
index 1dc3d68..87b7943 100644
--- a/secure_fw/CMakeLists.txt
+++ b/secure_fw/CMakeLists.txt
@@ -115,7 +115,7 @@
)
# Since s_veneers.o doesn't exist when this is evaluated by cmake we need to
- # explicity specify what language it will use.
+ # explicitly specify what language it will use.
set_target_properties(tfm_s_veneers
PROPERTIES
LINKER_LANGUAGE C
diff --git a/secure_fw/partitions/CMakeLists.txt b/secure_fw/partitions/CMakeLists.txt
index da74b16..1cc21a8 100644
--- a/secure_fw/partitions/CMakeLists.txt
+++ b/secure_fw/partitions/CMakeLists.txt
@@ -34,7 +34,7 @@
list(APPEND TEMP_TFM_EXTRA_PARTITION_PATHS ${TFM_EXTRA_PARTITION_PATHS})
-# Remove any duplicate entries to prevent same path appended twice in case of mulitiple runs
+# Remove any duplicate entries to prevent same path appended twice in case of multiple runs
list(REMOVE_DUPLICATES TEMP_TFM_EXTRA_PARTITION_PATHS)
if (TEMP_TFM_EXTRA_PARTITION_PATHS)
diff --git a/secure_fw/partitions/crypto/crypto_init.c b/secure_fw/partitions/crypto/crypto_init.c
index 031e3ba..46f913c 100644
--- a/secure_fw/partitions/crypto/crypto_init.c
+++ b/secure_fw/partitions/crypto/crypto_init.c
@@ -377,7 +377,7 @@
}
/*!
- * \defgroup init This group implements the partition initilisation
+ * \defgroup init This group implements the partition initialisation
* function to be called during TF-M boot, and the SFN
* servicing call to be called when a SFN request needs
* to be handled by the SPM. When built in IPC mode, the
diff --git a/secure_fw/partitions/firmware_update/bootloader/mcuboot/tfm_mcuboot_fwu.c b/secure_fw/partitions/firmware_update/bootloader/mcuboot/tfm_mcuboot_fwu.c
index 6029047..af9104b 100644
--- a/secure_fw/partitions/firmware_update/bootloader/mcuboot/tfm_mcuboot_fwu.c
+++ b/secure_fw/partitions/firmware_update/bootloader/mcuboot/tfm_mcuboot_fwu.c
@@ -385,7 +385,7 @@
* does not need to be confirmed explicitly in these two upgrade strategies.
* Image revert is supported in SWAP upgrade strategy and DIRECT_XIP upgrade
* strategy when MCUBOOT_DIRECT_XIP_REVERT is true. In these cases, the
- * image needs to be set as a permanent image explicitly. Then the accpeted
+ * image needs to be set as a permanent image explicitly. Then the accepted
* image can still be selected as the running image during next time reboot
* up. Otherwise, the image will be reverted and the previous one will be
* chosen as the running image.
diff --git a/secure_fw/partitions/firmware_update/bootloader/tfm_bootloader_fwu_abstraction.h b/secure_fw/partitions/firmware_update/bootloader/tfm_bootloader_fwu_abstraction.h
index 571f61b..599ccc3 100644
--- a/secure_fw/partitions/firmware_update/bootloader/tfm_bootloader_fwu_abstraction.h
+++ b/secure_fw/partitions/firmware_update/bootloader/tfm_bootloader_fwu_abstraction.h
@@ -85,7 +85,7 @@
* The components are in CANDIDATE state. Check the authenticity and integrity of
* the staged image in the components. If a reboot is required to complete the
* check, then mark this image as a candidate so that the next time bootloader
- * runs it will take this image as a candidate one to bootup. Return the error
+ * runs it will take this image as a candidate one to boot-up. Return the error
* code PSA_SUCCESS_REBOOT.
*
* \param[in] candidates A list of components in CANDIDATE state.
@@ -112,7 +112,7 @@
* \brief Mark the TRIAL(running) image in component as confirmed.
*
* Call this API to mark the running images as permanent/accepted to avoid
- * revert when next time bootup. Usually, this API is called after the running
+ * revert when next time boot-up. Usually, this API is called after the running
* images have been verified as valid.
*
* \param[in] candidates A list of components in TRIAL state.
@@ -131,7 +131,7 @@
* \brief Uninstall the staged image in the component.
*
* The component is in STAGED state. Uninstall the staged image in the component
- * so that this image will not be treated as a candidate next time bootup.
+ * so that this image will not be treated as a candidate next time boot-up.
*
* \return PSA_SUCCESS On success
* PSA_ERROR_INSUFFICIENT_MEMORY
diff --git a/secure_fw/partitions/idle_partition/idle_partition.c b/secure_fw/partitions/idle_partition/idle_partition.c
index 999a27a..2e56e9e 100644
--- a/secure_fw/partitions/idle_partition/idle_partition.c
+++ b/secure_fw/partitions/idle_partition/idle_partition.c
@@ -16,7 +16,7 @@
{
while (1) {
/*
- * There could be other Partitions becoming RUNABLE after wake up.
+ * There could be other Partitions becoming RUNNABLE after wake up.
* This is a dummy psa_wait to let SPM check possible scheduling.
* It does not expect any signals.
*/
@@ -35,7 +35,7 @@
while (1) {
/*
- * There could be other Partitions becoming RUNABLE after wake up.
+ * There could be other Partitions becoming RUNNABLE after wake up.
* This is a dummy psa_wait to let SPM check possible scheduling.
* It does not expect any signals.
*/
diff --git a/secure_fw/partitions/initial_attestation/Kconfig b/secure_fw/partitions/initial_attestation/Kconfig
index 6bf4ddb..5eefb0a 100644
--- a/secure_fw/partitions/initial_attestation/Kconfig
+++ b/secure_fw/partitions/initial_attestation/Kconfig
@@ -16,7 +16,7 @@
bool "Symmetric key algorithm based Initial Attestation"
default n
help
- Use symmetric crypto for inital attestation
+ Use symmetric crypto for initial attestation
config ATTEST_INCLUDE_TEST_CODE
bool "Include test code"
diff --git a/secure_fw/partitions/initial_attestation/attest.h b/secure_fw/partitions/initial_attestation/attest.h
index 660075f..4d8212b 100644
--- a/secure_fw/partitions/initial_attestation/attest.h
+++ b/secure_fw/partitions/initial_attestation/attest.h
@@ -49,7 +49,7 @@
*
* \param[in] major_type Major type of TLV entries to copy
* \param[out] ptr Pointer to the buffer to store the boot data
- * \parma[in] len Size of the buffer to store the boot data
+ * \param[in] len Size of the buffer to store the boot data
*
* \return Returns error code as specified in \ref psa_attest_err_t
*/
diff --git a/secure_fw/partitions/internal_trusted_storage/flash/its_flash_nand.c b/secure_fw/partitions/internal_trusted_storage/flash/its_flash_nand.c
index 425f194..8fa8be1 100644
--- a/secure_fw/partitions/internal_trusted_storage/flash/its_flash_nand.c
+++ b/secure_fw/partitions/internal_trusted_storage/flash/its_flash_nand.c
@@ -122,7 +122,7 @@
}
}
- /* Read the last data item if there is still remaing data. */
+ /* Read the last data item if there is still remaining data. */
if (remaining_len) {
ret = flash_dev->driver->ReadData(addr + read_length,
temp_buffer, 1);
diff --git a/secure_fw/partitions/internal_trusted_storage/flash/its_flash_nor.c b/secure_fw/partitions/internal_trusted_storage/flash/its_flash_nor.c
index 912af9b..9e425e7 100644
--- a/secure_fw/partitions/internal_trusted_storage/flash/its_flash_nor.c
+++ b/secure_fw/partitions/internal_trusted_storage/flash/its_flash_nor.c
@@ -107,7 +107,7 @@
}
}
- /* Read the last data item if there is still remaing data. */
+ /* Read the last data item if there is still remaining data. */
if (remaining_len) {
ret = ((ARM_DRIVER_FLASH *)cfg->flash_dev)->ReadData(
addr + read_length,
@@ -161,7 +161,7 @@
static psa_status_t its_flash_nor_flush(const struct its_flash_fs_config_t *cfg,
uint32_t block_id)
{
- /* Nothing needs to be done for NOR flash, as writes are commited to flash
+ /* Nothing needs to be done for NOR flash, as writes are committed to flash
* immediately.
*/
(void)cfg;
diff --git a/secure_fw/partitions/internal_trusted_storage/flash/its_flash_ram.c b/secure_fw/partitions/internal_trusted_storage/flash/its_flash_ram.c
index 91c9bcd..cd4e8fd 100644
--- a/secure_fw/partitions/internal_trusted_storage/flash/its_flash_ram.c
+++ b/secure_fw/partitions/internal_trusted_storage/flash/its_flash_ram.c
@@ -58,7 +58,7 @@
{
/* Nothing needs to be done for flash emulated in RAM, as writes are
- * commited immediately.
+ * committed immediately.
*/
(void)cfg;
(void)block_id;
diff --git a/secure_fw/partitions/internal_trusted_storage/flash_fs/its_flash_fs_mblock.c b/secure_fw/partitions/internal_trusted_storage/flash_fs/its_flash_fs_mblock.c
index 0416a77..be5dcf8 100644
--- a/secure_fw/partitions/internal_trusted_storage/flash_fs/its_flash_fs_mblock.c
+++ b/secure_fw/partitions/internal_trusted_storage/flash_fs/its_flash_fs_mblock.c
@@ -74,7 +74,7 @@
}
/**
- * \brief Gets the number of blocks that are dedicated wholely for data, for the
+ * \brief Gets the number of blocks that are dedicated wholly for data, for the
* current context.
*
* \param[in,out] fs_ctx Filesystem context
@@ -925,7 +925,7 @@
/* First two blocks are reserved for metadata */
- /* Read the header of both the metdata blocks. If the read succeeds, then
+ /* Read the header of both the metadata blocks. If the read succeeds, then
* attempt to validate the metadata header, otherwise assume that the block
* update was incomplete
*/
diff --git a/secure_fw/partitions/internal_trusted_storage/flash_fs/its_flash_fs_mblock.h b/secure_fw/partitions/internal_trusted_storage/flash_fs/its_flash_fs_mblock.h
index fe443f4..1d2fe42 100644
--- a/secure_fw/partitions/internal_trusted_storage/flash_fs/its_flash_fs_mblock.h
+++ b/secure_fw/partitions/internal_trusted_storage/flash_fs/its_flash_fs_mblock.h
@@ -89,7 +89,7 @@
/*!
* \struct its_metadata_block_header_comp_t
*
- * \brief The struture of metadata block header in
+ * \brief The structure of metadata block header in
* ITS_BACKWARD_SUPPORTED_VERSION.
*
* \note The active_swap_count must be the last member to allow it to be
@@ -278,7 +278,7 @@
* \note The files data in the logical block 0 is stored in same physical
* block where the metadata is stored. A change in the metadata requires a
* swap of physical blocks. So, the files data stored in the current
- * medadata block needs to be copied in the scratch block, unless
+ * metadata block needs to be copied in the scratch block, unless
* the data of the file processed is located in the logical block 0.
*
* \param[in,out] fs_ctx Filesystem context
diff --git a/secure_fw/partitions/internal_trusted_storage/its_crypto_interface.c b/secure_fw/partitions/internal_trusted_storage/its_crypto_interface.c
index 8ca642d..715ddcc 100644
--- a/secure_fw/partitions/internal_trusted_storage/its_crypto_interface.c
+++ b/secure_fw/partitions/internal_trusted_storage/its_crypto_interface.c
@@ -20,9 +20,9 @@
/**
* \brief Fills the AEAD additional data used for the encryption/decryption
*
- * \details The additional data are not encypted their integrity is checked.
+ * \details The additional data are not encrypted their integrity is checked.
* For the ITS encryption we use the file id, the file flags and the
- * data size of the file as addditional data.
+ * data size of the file as additional data.
*
* \param[out] add Additional data
* \param[in] add_size Additional data size in bytes
@@ -32,7 +32,7 @@
* \param[in] data_size Data size in bytes
*
* \retval PSA_SUCCESS On success
- * \retval PSA_ERROR_INVALID_ARGUMENT When the addditional data buffer does not
+ * \retval PSA_ERROR_INVALID_ARGUMENT When the additional data buffer does not
* have the correct size of the add/fid
* buffers are NULL
*
diff --git a/secure_fw/partitions/ns_agent_tz/CMakeLists.txt b/secure_fw/partitions/ns_agent_tz/CMakeLists.txt
index f9d7b10..05ea8a4 100644
--- a/secure_fw/partitions/ns_agent_tz/CMakeLists.txt
+++ b/secure_fw/partitions/ns_agent_tz/CMakeLists.txt
@@ -20,7 +20,7 @@
set(ARM_V80M_ARCH armv8-m.base armv8-m.main)
-# Trustzone NS Agent is tighly coupled with SPM
+# Trustzone NS Agent is tightly coupled with SPM
target_sources(tfm_spm
PRIVATE
"$<$<IN_LIST:${TFM_SYSTEM_ARCHITECTURE},${ARM_V80M_ARCH}>:${CMAKE_CURRENT_SOURCE_DIR}/ns_agent_tz_v80m.c>"
diff --git a/secure_fw/spm/core/arch/tfm_arch_v8m_main.c b/secure_fw/spm/core/arch/tfm_arch_v8m_main.c
index 1f213a0..c1d4f75 100644
--- a/secure_fw/spm/core/arch/tfm_arch_v8m_main.c
+++ b/secure_fw/spm/core/arch/tfm_arch_v8m_main.c
@@ -351,7 +351,7 @@
#if defined(__ARM_ARCH_8_1M_MAIN__) && (__ARM_ARCH_8_1M_MAIN__ == 1)
/*
- * \note Set Data Indepedent Timing (DIT) bit in AIRCR_S. This makes sure
+ * \note Set Data Independent Timing (DIT) bit in AIRCR_S. This makes sure
* that instructions which might have variable duration based on the
* value of their operands, are always taking the same amount of
* cycles to complete, for example UMLAL instruction used by the
diff --git a/secure_fw/spm/core/main.c b/secure_fw/spm/core/main.c
index e6388dc..277cdd6 100644
--- a/secure_fw/spm/core/main.c
+++ b/secure_fw/spm/core/main.c
@@ -116,7 +116,7 @@
FIH_LABEL_CRITICAL_POINT();
/*
- * Prioritise secure exceptions to avoid NS being able to pre-empt
+ * Prioritise secure exceptions to avoid NS being able to preempt
* secure SVC or SecureFault. Do it before PSA API initialization.
*/
tfm_arch_set_secure_exception_priorities();
diff --git a/secure_fw/spm/core/psa_api.c b/secure_fw/spm/core/psa_api.c
index 0584449..78205ea 100644
--- a/secure_fw/spm/core/psa_api.c
+++ b/secure_fw/spm/core/psa_api.c
@@ -86,7 +86,7 @@
/*
* signals_allowed can be 0 for TF-M internal partitions for special usages.
* Regular Secure Partitions should have at least one signal.
- * This is gauranteed by the manifest tool.
+ * This is guaranteed by the manifest tool.
* It is a PROGRAMMER ERROR if the signal_mask does not include any assigned
* signals.
*/
diff --git a/secure_fw/spm/core/spm.h b/secure_fw/spm/core/spm.h
index b46a3d5..7cf7e59 100644
--- a/secure_fw/spm/core/spm.h
+++ b/secure_fw/spm/core/spm.h
@@ -179,7 +179,7 @@
* \param[in] partition_id The Partition ID of the partition to get
*
* \retval NULL Failed
- * \retval "Not NULL" Return the parttion context pointer
+ * \retval "Not NULL" Return the partition context pointer
* \ref partition_t structures
*/
struct partition_t *tfm_spm_get_partition_by_id(int32_t partition_id);
diff --git a/secure_fw/spm/core/tfm_pools.h b/secure_fw/spm/core/tfm_pools.h
index e2a6107..3b77513 100644
--- a/secure_fw/spm/core/tfm_pools.h
+++ b/secure_fw/spm/core/tfm_pools.h
@@ -69,7 +69,7 @@
/**
* \brief Allocate a memory from pool.
*
- * \param[in] pool pool pointer decleared by \ref TFM_POOL_DECLARE
+ * \param[in] pool pool pointer declared by \ref TFM_POOL_DECLARE
*
* \retval buffer pointer Success.
* \retval NULL Failed.
@@ -79,7 +79,7 @@
/**
* \brief Free the allocated memory.
*
- * \param[in] pool pool pointer decleared by \ref TFM_POOL_DECLARE
+ * \param[in] pool pool pointer declared by \ref TFM_POOL_DECLARE
*
* \param[in] ptr Buffer pointer want to free.
*/
diff --git a/secure_fw/spm/include/bitops.h b/secure_fw/spm/include/bitops.h
index ed3ddd9..ce3aef4 100644
--- a/secure_fw/spm/include/bitops.h
+++ b/secure_fw/spm/include/bitops.h
@@ -9,7 +9,7 @@
#include <stdint.h>
-/* Check if there is only one bit availiable in a 32bit number */
+/* Check if there is only one bit available in a 32bit number */
#define IS_ONLY_ONE_BIT_IN_UINT32(n) \
((uint32_t)(n) && !((uint32_t)(n) & ((uint32_t)(n)-1)))
#endif /* __BITOPS_H__ */
diff --git a/secure_fw/spm/include/load/partition_defs.h b/secure_fw/spm/include/load/partition_defs.h
index 4ae9170..6d05bc9 100644
--- a/secure_fw/spm/include/load/partition_defs.h
+++ b/secure_fw/spm/include/load/partition_defs.h
@@ -33,7 +33,7 @@
* +---------+--+--+---+---+----------+
*
* Field Desc Value
- * Priority, bits[7:0]: Partition Priority Lowest, low, normal, high, hightest
+ * Priority, bits[7:0]: Partition Priority Lowest, low, normal, high, highest
* A/P, bit[8]: ARoT or PRoT domain 1: PRoT 0: ARoT
* I/S, bit[9]: IPC or SFN typed partition 1: IPC 0: SFN
* MB, bit[10]: NS Agent Mailbox or not 1: NS Agent mailbox 0: Not
diff --git a/secure_fw/spm/include/tfm_arch.h b/secure_fw/spm/include/tfm_arch.h
index 2d2f928..b321169 100644
--- a/secure_fw/spm/include/tfm_arch.h
+++ b/secure_fw/spm/include/tfm_arch.h
@@ -138,8 +138,8 @@
struct tfm_additional_context_t addi_ctx;
uint32_t exc_return; /* exception return value on SVC_PREPARE_DEPRIV_FLIH */
uint32_t dummy; /* dummy value for 8 bytes aligned */
- uint32_t psp; /* PSP when interrupt exception ocurrs */
- uint32_t psplim; /* PSPLIM when interrupt exception ocurrs when */
+ uint32_t psp; /* PSP when interrupt exception occurs */
+ uint32_t psplim; /* PSPLIM when interrupt exception occurs when */
struct tfm_state_context_t state_ctx; /* ctx on SVC_PREPARE_DEPRIV_FLIH */
};
@@ -322,7 +322,7 @@
* target PSA API to avoid using up the Secure Partitions' stacks. The NS agent
* shares the stack with the SPM so it doesn't need to switch.
*
- * The stack check process destroyes the caller registers so the input args and
+ * The stack check process destroys the caller registers so the input args and
* the target PSA API address are stored in the caller stack at the beginning.
* They are loaded again before the PSA API is called. This function is
* non-preemptive except for the target PSA API execution.
diff --git a/secure_fw/spm/include/tfm_core_trustzone.h b/secure_fw/spm/include/tfm_core_trustzone.h
index 4bb56cb..4de4dd6 100644
--- a/secure_fw/spm/include/tfm_core_trustzone.h
+++ b/secure_fw/spm/include/tfm_core_trustzone.h
@@ -29,7 +29,7 @@
#define TFM_BASIC_FP_CONTEXT_WORDS 18
/*
- * The numbers in 32bit words while addtional FP involved in preempted context:
+ * The numbers in 32bit words while additional FP involved in preempted context:
* S16 - S31
*/
#define TFM_ADDTIONAL_FP_CONTEXT_WORDS 16
diff --git a/secure_fw/spm/ns_client_ext/tfm_ns_client_ext.c b/secure_fw/spm/ns_client_ext/tfm_ns_client_ext.c
index 2b5a08c..e6759f7 100644
--- a/secure_fw/spm/ns_client_ext/tfm_ns_client_ext.c
+++ b/secure_fw/spm/ns_client_ext/tfm_ns_client_ext.c
@@ -10,7 +10,7 @@
#include "tfm_ns_ctx.h"
/*
- * Definiton of NS Client Token
+ * Definition of NS Client Token
* bit[0:7] - Thread ID
* bit[8:15] - Group ID
* bit[16:23] - Context identifier
diff --git a/secure_fw/spm/ns_client_ext/tfm_ns_ctx.c b/secure_fw/spm/ns_client_ext/tfm_ns_ctx.c
index 2887b87..e16931b 100644
--- a/secure_fw/spm/ns_client_ext/tfm_ns_ctx.c
+++ b/secure_fw/spm/ns_client_ext/tfm_ns_ctx.c
@@ -109,7 +109,7 @@
*/
if (idx == active_ns_ctx_index) {
if (ns_ctx_data[idx].tid == tid) {
- /* Release the currrent active thread */
+ /* Release the current active thread */
if (ns_ctx_data[idx].ref_cnt > 0) {
ns_ctx_data[idx].ref_cnt--;
}