aboutsummaryrefslogtreecommitdiff
path: root/platform
diff options
context:
space:
mode:
Diffstat (limited to 'platform')
-rw-r--r--platform/ext/target/arm/mps2/an519/spm_hal.c6
-rw-r--r--platform/ext/target/arm/mps2/an521/spm_hal.c7
-rw-r--r--platform/ext/target/arm/mps2/fvp_sse300/spm_hal.c5
-rw-r--r--platform/ext/target/arm/mps3/an524/spm_hal.c6
-rw-r--r--platform/ext/target/arm/mps3/an547/spm_hal.c5
-rw-r--r--platform/ext/target/arm/musca_b1/secure_enclave/spm_hal.c6
-rw-r--r--platform/ext/target/arm/musca_b1/sse_200/spm_hal.c5
-rw-r--r--platform/ext/target/arm/musca_s1/spm_hal.c6
-rw-r--r--platform/ext/target/cypress/psoc64/spm_hal.c6
-rw-r--r--platform/ext/target/nordic_nrf/common/core/spm_hal.c6
-rw-r--r--platform/ext/target/nuvoton/common/spm_hal.c6
-rw-r--r--platform/ext/target/nxp/common/spm_hal.c5
-rw-r--r--platform/ext/target/stm/common/stm32l5xx/secure/spm_hal.c4
-rw-r--r--platform/include/tfm_spm_hal.h14
14 files changed, 36 insertions, 51 deletions
diff --git a/platform/ext/target/arm/mps2/an519/spm_hal.c b/platform/ext/target/arm/mps2/an519/spm_hal.c
index 02cd47a97b..c192152c76 100644
--- a/platform/ext/target/arm/mps2/an519/spm_hal.c
+++ b/platform/ext/target/arm/mps2/an519/spm_hal.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2018-2020, Arm Limited. All rights reserved.
+ * Copyright (c) 2018-2021, Arm Limited. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*
@@ -22,11 +22,9 @@ extern ARM_DRIVER_MPC Driver_SRAM1_MPC;
extern const struct memory_region_limits memory_regions;
enum tfm_plat_err_t tfm_spm_hal_configure_default_isolation(
- uint32_t partition_idx,
+ bool privileged,
const struct platform_data_t *platform_data)
{
- bool privileged = tfm_is_partition_privileged(partition_idx);
-
if (!platform_data) {
return TFM_PLAT_ERR_INVALID_INPUT;
}
diff --git a/platform/ext/target/arm/mps2/an521/spm_hal.c b/platform/ext/target/arm/mps2/an521/spm_hal.c
index 58dee4d888..9390b46fef 100644
--- a/platform/ext/target/arm/mps2/an521/spm_hal.c
+++ b/platform/ext/target/arm/mps2/an521/spm_hal.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2018-2020, Arm Limited. All rights reserved.
+ * Copyright (c) 2018-2021, Arm Limited. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*
@@ -33,16 +33,15 @@ uint32_t periph_num_count = 0;
#ifdef TFM_FIH_PROFILE_ON
fih_int tfm_spm_hal_configure_default_isolation(
- uint32_t partition_idx,
+ bool privileged,
const struct platform_data_t *platform_data)
#else /* TFM_FIH_PROFILE_ON */
enum tfm_plat_err_t tfm_spm_hal_configure_default_isolation(
- uint32_t partition_idx,
+ bool privileged,
const struct platform_data_t *platform_data)
#endif /* TFM_FIH_PROFILE_ON */
{
fih_int fih_rc = FIH_FAILURE;
- bool privileged = tfm_is_partition_privileged(partition_idx);
#if defined(CONFIG_TFM_ENABLE_MEMORY_PROTECT) && (TFM_LVL != 1)
struct mpu_armv8m_region_cfg_t region_cfg;
#endif
diff --git a/platform/ext/target/arm/mps2/fvp_sse300/spm_hal.c b/platform/ext/target/arm/mps2/fvp_sse300/spm_hal.c
index 6b2d8a6d4e..ff26d6fc75 100644
--- a/platform/ext/target/arm/mps2/fvp_sse300/spm_hal.c
+++ b/platform/ext/target/arm/mps2/fvp_sse300/spm_hal.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2018-2020, Arm Limited. All rights reserved.
+ * Copyright (c) 2018-2021, Arm Limited. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*
@@ -27,11 +27,10 @@ uint32_t periph_num_count = 0;
#endif /* CONFIG_TFM_ENABLE_MEMORY_PROTECT */
enum tfm_plat_err_t tfm_spm_hal_configure_default_isolation(
- uint32_t partition_idx,
+ bool privileged,
const struct platform_data_t *platform_data)
{
#if defined(CONFIG_TFM_ENABLE_MEMORY_PROTECT) && (TFM_LVL != 1)
- bool privileged = tfm_is_partition_privileged(partition_idx);
struct mpu_armv8m_region_cfg_t region_cfg;
#endif
diff --git a/platform/ext/target/arm/mps3/an524/spm_hal.c b/platform/ext/target/arm/mps3/an524/spm_hal.c
index 8abe9d8a50..30907b20db 100644
--- a/platform/ext/target/arm/mps3/an524/spm_hal.c
+++ b/platform/ext/target/arm/mps3/an524/spm_hal.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2019-2020, Arm Limited. All rights reserved.
+ * Copyright (c) 2019-2021, Arm Limited. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*
@@ -33,11 +33,9 @@
extern const struct memory_region_limits memory_regions;
enum tfm_plat_err_t tfm_spm_hal_configure_default_isolation(
- uint32_t partition_idx,
+ bool privileged,
const struct platform_data_t *platform_data)
{
- bool privileged = tfm_is_partition_privileged(partition_idx);
-
if (!platform_data) {
return TFM_PLAT_ERR_INVALID_INPUT;
}
diff --git a/platform/ext/target/arm/mps3/an547/spm_hal.c b/platform/ext/target/arm/mps3/an547/spm_hal.c
index 840deac1ba..e8c8c8d684 100644
--- a/platform/ext/target/arm/mps3/an547/spm_hal.c
+++ b/platform/ext/target/arm/mps3/an547/spm_hal.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2018-2020, Arm Limited. All rights reserved.
+ * Copyright (c) 2018-2021, Arm Limited. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*
@@ -29,11 +29,10 @@ uint32_t periph_num_count = 0;
#endif /* CONFIG_TFM_ENABLE_MEMORY_PROTECT */
enum tfm_plat_err_t tfm_spm_hal_configure_default_isolation(
- uint32_t partition_idx,
+ bool privileged,
const struct platform_data_t *platform_data)
{
#if defined(CONFIG_TFM_ENABLE_MEMORY_PROTECT) && (TFM_LVL != 1)
- bool privileged = tfm_is_partition_privileged(partition_idx);
struct mpu_armv8m_region_cfg_t region_cfg;
#endif
diff --git a/platform/ext/target/arm/musca_b1/secure_enclave/spm_hal.c b/platform/ext/target/arm/musca_b1/secure_enclave/spm_hal.c
index b80007853c..207db15c15 100644
--- a/platform/ext/target/arm/musca_b1/secure_enclave/spm_hal.c
+++ b/platform/ext/target/arm/musca_b1/secure_enclave/spm_hal.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2018-2020, Arm Limited. All rights reserved.
+ * Copyright (c) 2018-2021, Arm Limited. All rights reserved.
* Copyright (c) 2019-2020, Cypress Semiconductor Corporation. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
@@ -21,12 +21,12 @@
extern const struct memory_region_limits memory_regions;
enum tfm_plat_err_t tfm_spm_hal_configure_default_isolation(
- uint32_t partition_idx,
+ bool privileged,
const struct platform_data_t *platform_data)
{
/* Nothing to do, there is no isolation HW in this platform to be
* configured by Secure Enclave */
- (void) partition_idx;
+ (void) privileged;
(void) platform_data;
return TFM_PLAT_ERR_SUCCESS;
}
diff --git a/platform/ext/target/arm/musca_b1/sse_200/spm_hal.c b/platform/ext/target/arm/musca_b1/sse_200/spm_hal.c
index 42c10cffe2..58ac546039 100644
--- a/platform/ext/target/arm/musca_b1/sse_200/spm_hal.c
+++ b/platform/ext/target/arm/musca_b1/sse_200/spm_hal.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2018-2020, Arm Limited. All rights reserved.
+ * Copyright (c) 2018-2021, Arm Limited. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*
@@ -33,10 +33,9 @@ uint32_t periph_num_count = 0;
#endif /* CONFIG_TFM_ENABLE_MEMORY_PROTECT */
enum tfm_plat_err_t tfm_spm_hal_configure_default_isolation(
- uint32_t partition_idx,
+ bool privileged,
const struct platform_data_t *platform_data)
{
- bool privileged = tfm_is_partition_privileged(partition_idx);
#if defined(CONFIG_TFM_ENABLE_MEMORY_PROTECT) && (TFM_LVL != 1)
struct mpu_armv8m_region_cfg_t region_cfg;
#endif
diff --git a/platform/ext/target/arm/musca_s1/spm_hal.c b/platform/ext/target/arm/musca_s1/spm_hal.c
index dba21775c6..46f0de0d24 100644
--- a/platform/ext/target/arm/musca_s1/spm_hal.c
+++ b/platform/ext/target/arm/musca_s1/spm_hal.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2018-2020, Arm Limited. All rights reserved.
+ * Copyright (c) 2018-2021, Arm Limited. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*
@@ -25,11 +25,9 @@ extern const struct memory_region_limits memory_regions;
struct mpu_armv8m_dev_t dev_mpu_s = { MPU_BASE };
enum tfm_plat_err_t tfm_spm_hal_configure_default_isolation(
- uint32_t partition_idx,
+ bool privileged,
const struct platform_data_t *platform_data)
{
- bool privileged = tfm_is_partition_privileged(partition_idx);
-
if (!platform_data) {
return TFM_PLAT_ERR_INVALID_INPUT;
}
diff --git a/platform/ext/target/cypress/psoc64/spm_hal.c b/platform/ext/target/cypress/psoc64/spm_hal.c
index 7b4e2fed8e..b996368fcc 100644
--- a/platform/ext/target/cypress/psoc64/spm_hal.c
+++ b/platform/ext/target/cypress/psoc64/spm_hal.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2018-2020, Arm Limited. All rights reserved.
+ * Copyright (c) 2018-2021, Arm Limited. All rights reserved.
* Copyright (c) 2019-2020, Cypress Semiconductor Corporation. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
@@ -35,10 +35,10 @@
extern const struct memory_region_limits memory_regions;
enum tfm_plat_err_t tfm_spm_hal_configure_default_isolation(
- uint32_t partition_idx,
+ bool privileged,
const struct platform_data_t *platform_data)
{
- (void) partition_idx; /* Unused parameter */
+ (void) privileged; /* Unused parameter */
if (!platform_data) {
return TFM_PLAT_ERR_INVALID_INPUT;
}
diff --git a/platform/ext/target/nordic_nrf/common/core/spm_hal.c b/platform/ext/target/nordic_nrf/common/core/spm_hal.c
index d38100d31d..5b9aa9c11e 100644
--- a/platform/ext/target/nordic_nrf/common/core/spm_hal.c
+++ b/platform/ext/target/nordic_nrf/common/core/spm_hal.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2018-2020, Arm Limited. All rights reserved.
+ * Copyright (c) 2018-2021, Arm Limited. All rights reserved.
* Copyright (c) 2020, Nordic Semiconductor ASA. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
@@ -29,7 +29,7 @@ static uint32_t periph_num_count = 0;
#endif /* CONFIG_TFM_ENABLE_MEMORY_PROTECT */
enum tfm_plat_err_t tfm_spm_hal_configure_default_isolation(
- uint32_t partition_idx,
+ bool privileged,
const struct platform_data_t *platform_data)
{
if (!platform_data) {
@@ -38,7 +38,7 @@ enum tfm_plat_err_t tfm_spm_hal_configure_default_isolation(
#if defined(CONFIG_TFM_ENABLE_MEMORY_PROTECT) && (TFM_LVL != 1)
- if (!tfm_is_partition_privileged(partition_idx)) {
+ if (!privileged) {
struct mpu_armv8m_region_cfg_t region_cfg;
region_cfg.region_nr = PARTITION_REGION_PERIPH_START + periph_num_count;
diff --git a/platform/ext/target/nuvoton/common/spm_hal.c b/platform/ext/target/nuvoton/common/spm_hal.c
index 500593bbf2..9772399d3d 100644
--- a/platform/ext/target/nuvoton/common/spm_hal.c
+++ b/platform/ext/target/nuvoton/common/spm_hal.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2018-2020, Arm Limited. All rights reserved.
+ * Copyright (c) 2018-2021, Arm Limited. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*
@@ -22,11 +22,9 @@ extern ARM_DRIVER_MPC Driver_SRAM1_MPC;
extern const struct memory_region_limits memory_regions;
enum tfm_plat_err_t tfm_spm_hal_configure_default_isolation(
- uint32_t partition_idx,
+ bool privileged,
const struct platform_data_t *platform_data)
{
- bool privileged = tfm_is_partition_privileged(partition_idx);
-
if (!platform_data) {
return TFM_PLAT_ERR_INVALID_INPUT;
}
diff --git a/platform/ext/target/nxp/common/spm_hal.c b/platform/ext/target/nxp/common/spm_hal.c
index b9a6e98912..fee91a905b 100644
--- a/platform/ext/target/nxp/common/spm_hal.c
+++ b/platform/ext/target/nxp/common/spm_hal.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2018-2020, Arm Limited. All rights reserved.
+ * Copyright (c) 2018-2021, Arm Limited. All rights reserved.
* Copyright 2019-2020 NXP. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
@@ -30,10 +30,9 @@ uint32_t periph_num_count = 0;
#endif /* CONFIG_TFM_ENABLE_MEMORY_PROTECT */
enum tfm_plat_err_t tfm_spm_hal_configure_default_isolation(
- uint32_t partition_idx,
+ bool privileged,
const struct platform_data_t *platform_data)
{
- bool privileged = tfm_is_partition_privileged(partition_idx);
#if defined(CONFIG_TFM_ENABLE_MEMORY_PROTECT) && (TFM_LVL != 1)
struct mpu_armv8m_region_cfg_t region_cfg;
#endif
diff --git a/platform/ext/target/stm/common/stm32l5xx/secure/spm_hal.c b/platform/ext/target/stm/common/stm32l5xx/secure/spm_hal.c
index 94cab01c93..638d0cfdfc 100644
--- a/platform/ext/target/stm/common/stm32l5xx/secure/spm_hal.c
+++ b/platform/ext/target/stm/common/stm32l5xx/secure/spm_hal.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2018-2020, Arm Limited. All rights reserved.
+ * Copyright (c) 2018-2021, Arm Limited. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*
@@ -19,7 +19,7 @@
extern const struct memory_region_limits memory_regions;
enum tfm_plat_err_t tfm_spm_hal_configure_default_isolation(
- uint32_t partition_idx,
+ bool privileged,
const struct platform_data_t *platform_data)
{
/* plat data are ignored */
diff --git a/platform/include/tfm_spm_hal.h b/platform/include/tfm_spm_hal.h
index 11da3c9aa5..57304926bc 100644
--- a/platform/include/tfm_spm_hal.h
+++ b/platform/include/tfm_spm_hal.h
@@ -51,20 +51,19 @@ fih_int tfm_spm_hal_setup_isolation_hw(void);
/**
* \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 @@ enum tfm_plat_err_t tfm_spm_hal_setup_isolation_hw(void);
/**
* \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.