HAL: Replace the 'idx' input param with 'privileged'
In tfm_spm_hal_configure_default_isolation(), a partition index
is passed in to query the partition privilege. Change to pass
in privilege directly instead of the partition index.
Change-Id: Id046431cc8e224a94e83a71564ba2843fabf8ed7
Signed-off-by: Mingyang Sun <mingyang.sun@arm.com>
diff --git a/platform/include/tfm_spm_hal.h b/platform/include/tfm_spm_hal.h
index 11da3c9..5730492 100644
--- a/platform/include/tfm_spm_hal.h
+++ b/platform/include/tfm_spm_hal.h
@@ -51,20 +51,19 @@
/**
* \brief Configure peripherals for a partition based on the platform data and
- * partition index from the DB
+ * partition privilege
*
* This function is called during partition initialisation (before calling the
* init function for the partition)
*
- * \param[in] partition_idx The index of the partition that this peripheral
- * is assigned to.
+ * \param[in] privileged Whether the partition is privileged.
* \param[in] platform_data The platform fields of the partition DB record to
* be used for configuration.
*
* \return Returns values as specified by FIH specific platform error code
*/
fih_int tfm_spm_hal_configure_default_isolation(
- uint32_t partition_idx,
+ bool privileged,
const struct platform_data_t *platform_data);
/**
* \brief Configures the system debug properties.
@@ -106,20 +105,19 @@
/**
* \brief Configure peripherals for a partition based on the platform data and
- * partition index from the DB
+ * partition privilege
*
* This function is called during partition initialisation (before calling the
* init function for the partition)
*
- * \param[in] partition_idx The index of the partition that this peripheral
- * is assigned to.
+ * \param[in] privileged Whether the partition is privileged.
* \param[in] platform_data The platform fields of the partition DB record to
* be used for configuration.
*
* \return Returns values as specified by the \ref tfm_plat_err_t
*/
enum tfm_plat_err_t tfm_spm_hal_configure_default_isolation(
- uint32_t partition_idx,
+ bool priviledged,
const struct platform_data_t *platform_data);
/**
* \brief Configures the system debug properties.