SPM: Change partition platform data binding
- Rename the long name 'tfm_spm_partition_platform_data_t'
to 'platform_data_t'.
- Platform data list is now part of partition static data.
- Update related init logic related to this name and position
change.
Change-Id: I1676f35b53f9c3074a70ab4fb68673a347bd422f
Signed-off-by: Ken Liu <Ken.Liu@arm.com>
diff --git a/docs/design_documents/tfm_partition_and_service_design_document.rst b/docs/design_documents/tfm_partition_and_service_design_document.rst
index b23ae01..83e8c30 100644
--- a/docs/design_documents/tfm_partition_and_service_design_document.rst
+++ b/docs/design_documents/tfm_partition_and_service_design_document.rst
@@ -42,7 +42,7 @@
struct spm_partition_desc_t {
struct spm_partition_runtime_data_t runtime_data;
const struct spm_partition_static_data_t *static_data;
- const struct tfm_spm_partition_platform_data_t *platform_data;
+ const struct platform_data_t *platform_data;
#if TFM_PSA_API
const struct tfm_spm_partition_memory_data_t *memory_data;
#endif
diff --git a/docs/design_documents/tfm_physical_attack_mitigation.rst b/docs/design_documents/tfm_physical_attack_mitigation.rst
index b319bba..a167d12 100644
--- a/docs/design_documents/tfm_physical_attack_mitigation.rst
+++ b/docs/design_documents/tfm_physical_attack_mitigation.rst
@@ -396,7 +396,7 @@
enum tfm_hal_status_t tfm_hal_set_up_static_boundaries(void);
enum tfm_plat_err_t tfm_spm_hal_configure_default_isolation(
uint32_t partition_idx,
- const struct tfm_spm_partition_platform_data_t *platform_data);
+ const struct platform_data_t *platform_data);
enum tfm_hal_status_t tfm_hal_mpu_update_partition_boundary(uintptr_t start,
uintptr_t end);
diff --git a/docs/reference/services/tfm_secure_partition_addition.rst b/docs/reference/services/tfm_secure_partition_addition.rst
index a9c3759..6289e2a 100644
--- a/docs/reference/services/tfm_secure_partition_addition.rst
+++ b/docs/reference/services/tfm_secure_partition_addition.rst
@@ -210,7 +210,7 @@
.. code-block:: c
- struct tfm_spm_partition_platform_data_t {
+ struct platform_data_t {
uint32_t periph_start;
uint32_t periph_limit;
int16_t periph_ppc_bank;
@@ -226,7 +226,7 @@
.. code-block:: c
- struct tfm_spm_partition_platform_data_t tfm_peripheral_A;
+ struct platform_data_t tfm_peripheral_A;
#define TFM_PERIPHERAL_A (&tfm_peripheral_A)
linker_pattern
diff --git a/platform/ext/target/cypress/psoc64/spm_hal.c b/platform/ext/target/cypress/psoc64/spm_hal.c
index 4472b48..7b4e2fe 100644
--- a/platform/ext/target/cypress/psoc64/spm_hal.c
+++ b/platform/ext/target/cypress/psoc64/spm_hal.c
@@ -36,7 +36,7 @@
enum tfm_plat_err_t tfm_spm_hal_configure_default_isolation(
uint32_t partition_idx,
- const struct tfm_spm_partition_platform_data_t *platform_data)
+ const struct platform_data_t *platform_data)
{
(void) partition_idx; /* Unused parameter */
if (!platform_data) {
diff --git a/platform/ext/target/cypress/psoc64/target_cfg.c b/platform/ext/target/cypress/psoc64/target_cfg.c
index 2474f22..52d6893 100755
--- a/platform/ext/target/cypress/psoc64/target_cfg.c
+++ b/platform/ext/target/cypress/psoc64/target_cfg.c
@@ -61,14 +61,14 @@
*/
#define SCB_AIRCR_WRITE_MASK ((0x5FAUL << SCB_AIRCR_VECTKEY_Pos))
-struct tfm_spm_partition_platform_data_t tfm_peripheral_std_uart = {
+struct platform_data_t tfm_peripheral_std_uart = {
SCB5_BASE,
SCB5_BASE + 0xFFF,
-1,
-1
};
-struct tfm_spm_partition_platform_data_t tfm_peripheral_timer0 = {
+struct platform_data_t tfm_peripheral_timer0 = {
TCPWM0_BASE,
TCPWM0_BASE + (sizeof(TCPWM_Type) - 1),
-1,
diff --git a/platform/ext/target/cypress/psoc64/target_cfg.h b/platform/ext/target/cypress/psoc64/target_cfg.h
index dec0875..d2d9c61 100644
--- a/platform/ext/target/cypress/psoc64/target_cfg.h
+++ b/platform/ext/target/cypress/psoc64/target_cfg.h
@@ -36,7 +36,7 @@
/**
* \brief Holds the data necessary to do isolation for a specific peripheral.
*/
-struct tfm_spm_partition_platform_data_t
+struct platform_data_t
{
uint32_t periph_start;
uint32_t periph_limit;
diff --git a/platform/ext/target/cypress/psoc64/tfm_peripherals_def.h b/platform/ext/target/cypress/psoc64/tfm_peripherals_def.h
index 835822e..7815dda 100644
--- a/platform/ext/target/cypress/psoc64/tfm_peripherals_def.h
+++ b/platform/ext/target/cypress/psoc64/tfm_peripherals_def.h
@@ -18,11 +18,11 @@
#define TFM_TIMER0_IRQ (NvicMux3_IRQn)
#define TFM_TIMER1_IRQ (tcpwm_0_interrupts_1_IRQn)
-struct tfm_spm_partition_platform_data_t;
+struct platform_data_t;
-extern struct tfm_spm_partition_platform_data_t tfm_peripheral_std_uart;
-extern struct tfm_spm_partition_platform_data_t tfm_peripheral_uart1;
-extern struct tfm_spm_partition_platform_data_t tfm_peripheral_timer0;
+extern struct platform_data_t tfm_peripheral_std_uart;
+extern struct platform_data_t tfm_peripheral_uart1;
+extern struct platform_data_t tfm_peripheral_timer0;
#define TFM_PERIPHERAL_STD_UART (&tfm_peripheral_std_uart)
#define TFM_PERIPHERAL_UART1 (&tfm_peripheral_uart1)
diff --git a/platform/ext/target/mps2/an519/spm_hal.c b/platform/ext/target/mps2/an519/spm_hal.c
index e7d080f..02cd47a 100644
--- a/platform/ext/target/mps2/an519/spm_hal.c
+++ b/platform/ext/target/mps2/an519/spm_hal.c
@@ -23,7 +23,7 @@
enum tfm_plat_err_t tfm_spm_hal_configure_default_isolation(
uint32_t partition_idx,
- const struct tfm_spm_partition_platform_data_t *platform_data)
+ const struct platform_data_t *platform_data)
{
bool privileged = tfm_is_partition_privileged(partition_idx);
diff --git a/platform/ext/target/mps2/an519/target_cfg.c b/platform/ext/target/mps2/an519/target_cfg.c
index 6944ebb..9127926b 100644
--- a/platform/ext/target/mps2/an519/target_cfg.c
+++ b/platform/ext/target/mps2/an519/target_cfg.c
@@ -91,28 +91,28 @@
#define All_SEL_STATUS (SPNIDEN_SEL_STATUS | SPIDEN_SEL_STATUS | \
NIDEN_SEL_STATUS | DBGEN_SEL_STATUS)
-struct tfm_spm_partition_platform_data_t tfm_peripheral_std_uart = {
+struct platform_data_t tfm_peripheral_std_uart = {
UART0_BASE_NS,
UART0_BASE_NS + 0xFFF,
PPC_SP_DO_NOT_CONFIGURE,
-1
};
-struct tfm_spm_partition_platform_data_t tfm_peripheral_uart1 = {
+struct platform_data_t tfm_peripheral_uart1 = {
UART1_BASE_S,
UART1_BASE_S + 0xFFF,
PPC_SP_APB_PPC_EXP1,
CMSDK_UART1_APB_PPC_POS
};
-struct tfm_spm_partition_platform_data_t tfm_peripheral_fpga_io = {
+struct platform_data_t tfm_peripheral_fpga_io = {
MPS2_IO_FPGAIO_BASE_S,
MPS2_IO_FPGAIO_BASE_S + 0xFFF,
PPC_SP_APB_PPC_EXP2,
CMSDK_FPGA_IO_PPC_POS
};
-struct tfm_spm_partition_platform_data_t tfm_peripheral_timer0 = {
+struct platform_data_t tfm_peripheral_timer0 = {
CMSDK_TIMER0_BASE_S,
CMSDK_TIMER1_BASE_S - 1,
PPC_SP_APB_PPC0,
diff --git a/platform/ext/target/mps2/an519/target_cfg.h b/platform/ext/target/mps2/an519/target_cfg.h
index 8f45955..f427b5f 100644
--- a/platform/ext/target/mps2/an519/target_cfg.h
+++ b/platform/ext/target/mps2/an519/target_cfg.h
@@ -68,7 +68,7 @@
/**
* \brief Holds the data necessary to do isolation for a specific peripheral.
*/
-struct tfm_spm_partition_platform_data_t
+struct platform_data_t
{
uint32_t periph_start;
uint32_t periph_limit;
diff --git a/platform/ext/target/mps2/an519/tfm_peripherals_def.h b/platform/ext/target/mps2/an519/tfm_peripherals_def.h
index 0d0a0a5..4ddf169 100644
--- a/platform/ext/target/mps2/an519/tfm_peripherals_def.h
+++ b/platform/ext/target/mps2/an519/tfm_peripherals_def.h
@@ -18,12 +18,12 @@
#define TFM_TIMER0_IRQ (TIMER0_IRQn)
#define TFM_TIMER1_IRQ (TIMER1_IRQn)
-struct tfm_spm_partition_platform_data_t;
+struct platform_data_t;
-extern struct tfm_spm_partition_platform_data_t tfm_peripheral_std_uart;
-extern struct tfm_spm_partition_platform_data_t tfm_peripheral_uart1;
-extern struct tfm_spm_partition_platform_data_t tfm_peripheral_fpga_io;
-extern struct tfm_spm_partition_platform_data_t tfm_peripheral_timer0;
+extern struct platform_data_t tfm_peripheral_std_uart;
+extern struct platform_data_t tfm_peripheral_uart1;
+extern struct platform_data_t tfm_peripheral_fpga_io;
+extern struct platform_data_t tfm_peripheral_timer0;
#define TFM_PERIPHERAL_STD_UART (&tfm_peripheral_std_uart)
#define TFM_PERIPHERAL_UART1 (&tfm_peripheral_uart1)
diff --git a/platform/ext/target/mps2/an521/spm_hal.c b/platform/ext/target/mps2/an521/spm_hal.c
index 6d998b8..2ed7ee1 100644
--- a/platform/ext/target/mps2/an521/spm_hal.c
+++ b/platform/ext/target/mps2/an521/spm_hal.c
@@ -32,7 +32,7 @@
enum tfm_plat_err_t tfm_spm_hal_configure_default_isolation(
uint32_t partition_idx,
- const struct tfm_spm_partition_platform_data_t *platform_data)
+ 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)
diff --git a/platform/ext/target/mps2/an521/target_cfg.c b/platform/ext/target/mps2/an521/target_cfg.c
index 897bd08..5d70607 100644
--- a/platform/ext/target/mps2/an521/target_cfg.c
+++ b/platform/ext/target/mps2/an521/target_cfg.c
@@ -92,28 +92,28 @@
#define All_SEL_STATUS (SPNIDEN_SEL_STATUS | SPIDEN_SEL_STATUS | \
NIDEN_SEL_STATUS | DBGEN_SEL_STATUS)
-struct tfm_spm_partition_platform_data_t tfm_peripheral_std_uart = {
+struct platform_data_t tfm_peripheral_std_uart = {
UART0_BASE_NS,
UART0_BASE_NS + 0xFFF,
PPC_SP_DO_NOT_CONFIGURE,
-1
};
-struct tfm_spm_partition_platform_data_t tfm_peripheral_uart1 = {
+struct platform_data_t tfm_peripheral_uart1 = {
UART1_BASE_S,
UART1_BASE_S + 0xFFF,
PPC_SP_APB_PPC_EXP1,
CMSDK_UART1_APB_PPC_POS
};
-struct tfm_spm_partition_platform_data_t tfm_peripheral_fpga_io = {
+struct platform_data_t tfm_peripheral_fpga_io = {
MPS2_IO_FPGAIO_BASE_S,
MPS2_IO_FPGAIO_BASE_S + 0xFFF,
PPC_SP_APB_PPC_EXP2,
CMSDK_FPGA_IO_PPC_POS
};
-struct tfm_spm_partition_platform_data_t tfm_peripheral_timer0 = {
+struct platform_data_t tfm_peripheral_timer0 = {
CMSDK_TIMER0_BASE_S,
CMSDK_TIMER1_BASE_S - 1,
PPC_SP_APB_PPC0,
@@ -127,7 +127,7 @@
* security.
*/
-struct tfm_spm_partition_platform_data_t
+struct platform_data_t
tfm_peripheral_FF_TEST_UART_REGION = {
UART2_BASE_S,
UART2_BASE_S + 0xFFF,
@@ -135,7 +135,7 @@
CMSDK_UART2_APB_PPC_POS
};
-struct tfm_spm_partition_platform_data_t
+struct platform_data_t
tfm_peripheral_FF_TEST_WATCHDOG_REGION = {
APB_WATCHDOG_BASE_S,
APB_WATCHDOG_BASE_S + 0xFFF,
@@ -150,7 +150,7 @@
#define FF_TEST_DRIVER_PARTITION_MMIO_START 0x3801FE00
#define FF_TEST_DRIVER_PARTITION_MMIO_END 0x3801FF00
-struct tfm_spm_partition_platform_data_t
+struct platform_data_t
tfm_peripheral_FF_TEST_NVMEM_REGION = {
FF_TEST_NVMEM_REGION_START,
FF_TEST_NVMEM_REGION_END,
@@ -158,7 +158,7 @@
-1
};
-struct tfm_spm_partition_platform_data_t
+struct platform_data_t
tfm_peripheral_FF_TEST_SERVER_PARTITION_MMIO = {
FF_TEST_SERVER_PARTITION_MMIO_START,
FF_TEST_SERVER_PARTITION_MMIO_END,
@@ -166,7 +166,7 @@
-1
};
-struct tfm_spm_partition_platform_data_t
+struct platform_data_t
tfm_peripheral_FF_TEST_DRIVER_PARTITION_MMIO = {
FF_TEST_DRIVER_PARTITION_MMIO_START,
FF_TEST_DRIVER_PARTITION_MMIO_END,
diff --git a/platform/ext/target/mps2/an521/target_cfg.h b/platform/ext/target/mps2/an521/target_cfg.h
index 8f45955..f427b5f 100644
--- a/platform/ext/target/mps2/an521/target_cfg.h
+++ b/platform/ext/target/mps2/an521/target_cfg.h
@@ -68,7 +68,7 @@
/**
* \brief Holds the data necessary to do isolation for a specific peripheral.
*/
-struct tfm_spm_partition_platform_data_t
+struct platform_data_t
{
uint32_t periph_start;
uint32_t periph_limit;
diff --git a/platform/ext/target/mps2/an521/tfm_peripherals_def.h b/platform/ext/target/mps2/an521/tfm_peripherals_def.h
index ea313a3..c5b80bf 100644
--- a/platform/ext/target/mps2/an521/tfm_peripherals_def.h
+++ b/platform/ext/target/mps2/an521/tfm_peripherals_def.h
@@ -20,12 +20,12 @@
#define FF_TEST_UART_IRQ (UARTTX2_IRQn)
#define FF_TEST_UART_IRQ_Handler UARTTX2_Handler
-struct tfm_spm_partition_platform_data_t;
+struct platform_data_t;
-extern struct tfm_spm_partition_platform_data_t tfm_peripheral_std_uart;
-extern struct tfm_spm_partition_platform_data_t tfm_peripheral_uart1;
-extern struct tfm_spm_partition_platform_data_t tfm_peripheral_fpga_io;
-extern struct tfm_spm_partition_platform_data_t tfm_peripheral_timer0;
+extern struct platform_data_t tfm_peripheral_std_uart;
+extern struct platform_data_t tfm_peripheral_uart1;
+extern struct platform_data_t tfm_peripheral_fpga_io;
+extern struct platform_data_t tfm_peripheral_timer0;
#define TFM_PERIPHERAL_STD_UART (&tfm_peripheral_std_uart)
#define TFM_PERIPHERAL_UART1 (&tfm_peripheral_uart1)
@@ -33,11 +33,11 @@
#define TFM_PERIPHERAL_TIMER0 (&tfm_peripheral_timer0)
#ifdef PSA_API_TEST_IPC
-extern struct tfm_spm_partition_platform_data_t tfm_peripheral_FF_TEST_UART_REGION;
-extern struct tfm_spm_partition_platform_data_t tfm_peripheral_FF_TEST_WATCHDOG_REGION;
-extern struct tfm_spm_partition_platform_data_t tfm_peripheral_FF_TEST_NVMEM_REGION;
-extern struct tfm_spm_partition_platform_data_t tfm_peripheral_FF_TEST_SERVER_PARTITION_MMIO;
-extern struct tfm_spm_partition_platform_data_t tfm_peripheral_FF_TEST_DRIVER_PARTITION_MMIO;
+extern struct platform_data_t tfm_peripheral_FF_TEST_UART_REGION;
+extern struct platform_data_t tfm_peripheral_FF_TEST_WATCHDOG_REGION;
+extern struct platform_data_t tfm_peripheral_FF_TEST_NVMEM_REGION;
+extern struct platform_data_t tfm_peripheral_FF_TEST_SERVER_PARTITION_MMIO;
+extern struct platform_data_t tfm_peripheral_FF_TEST_DRIVER_PARTITION_MMIO;
#define FF_TEST_UART_REGION (&tfm_peripheral_FF_TEST_UART_REGION)
#define FF_TEST_WATCHDOG_REGION (&tfm_peripheral_FF_TEST_WATCHDOG_REGION)
#define FF_TEST_NVMEM_REGION (&tfm_peripheral_FF_TEST_NVMEM_REGION)
diff --git a/platform/ext/target/mps2/an539/spm_hal.c b/platform/ext/target/mps2/an539/spm_hal.c
index 49c7b1b..0f96768 100644
--- a/platform/ext/target/mps2/an539/spm_hal.c
+++ b/platform/ext/target/mps2/an539/spm_hal.c
@@ -34,7 +34,7 @@
enum tfm_plat_err_t tfm_spm_hal_configure_default_isolation(
uint32_t partition_idx,
- const struct tfm_spm_partition_platform_data_t *platform_data)
+ const struct platform_data_t *platform_data)
{
bool privileged = tfm_is_partition_privileged(partition_idx);
diff --git a/platform/ext/target/mps2/an539/target_cfg.c b/platform/ext/target/mps2/an539/target_cfg.c
index 4d1c340..9a2b2a1 100644
--- a/platform/ext/target/mps2/an539/target_cfg.c
+++ b/platform/ext/target/mps2/an539/target_cfg.c
@@ -95,21 +95,21 @@
*/
#define SCB_AIRCR_WRITE_MASK ((0x5FAUL << SCB_AIRCR_VECTKEY_Pos))
-struct tfm_spm_partition_platform_data_t tfm_peripheral_std_uart = {
+struct platform_data_t tfm_peripheral_std_uart = {
UART0_BASE_NS,
UART0_BASE_NS + 0xFFF,
PPC_SP_DO_NOT_CONFIGURE,
-1
};
-struct tfm_spm_partition_platform_data_t tfm_peripheral_fpga_io = {
+struct platform_data_t tfm_peripheral_fpga_io = {
MPS2_IO_FPGAIO_BASE_S,
MPS2_IO_FPGAIO_BASE_S + 0xFFF,
PPC_SP_APB_PPC_EXP3,
FPGA_IO_APB_PPCEXP3_POS
};
-struct tfm_spm_partition_platform_data_t tfm_peripheral_timer0 = {
+struct platform_data_t tfm_peripheral_timer0 = {
SYSTEM_TIMER0_BASE_S,
SYSTEM_TIMER1_BASE_S - 1,
PPC_SP_APB_PPC,
diff --git a/platform/ext/target/mps2/an539/target_cfg.h b/platform/ext/target/mps2/an539/target_cfg.h
index c92c488..66a3a12 100644
--- a/platform/ext/target/mps2/an539/target_cfg.h
+++ b/platform/ext/target/mps2/an539/target_cfg.h
@@ -56,7 +56,7 @@
/**
* \brief Holds the data necessary to do isolation for a specific peripheral.
*/
-struct tfm_spm_partition_platform_data_t {
+struct platform_data_t {
uint32_t periph_start;
uint32_t periph_limit;
enum ppc_bank_e periph_ppc_bank;
diff --git a/platform/ext/target/mps2/an539/tfm_peripherals_def.h b/platform/ext/target/mps2/an539/tfm_peripherals_def.h
index ed1e850..eb27020 100644
--- a/platform/ext/target/mps2/an539/tfm_peripherals_def.h
+++ b/platform/ext/target/mps2/an539/tfm_peripherals_def.h
@@ -18,11 +18,11 @@
#define TFM_TIMER0_IRQ (TIMER0_IRQn)
#define TFM_TIMER1_IRQ (TIMER1_IRQn)
-struct tfm_spm_partition_platform_data_t;
+struct platform_data_t;
-extern struct tfm_spm_partition_platform_data_t tfm_peripheral_std_uart;
-extern struct tfm_spm_partition_platform_data_t tfm_peripheral_fpga_io;
-extern struct tfm_spm_partition_platform_data_t tfm_peripheral_timer0;
+extern struct platform_data_t tfm_peripheral_std_uart;
+extern struct platform_data_t tfm_peripheral_fpga_io;
+extern struct platform_data_t tfm_peripheral_timer0;
#define TFM_PERIPHERAL_STD_UART (&tfm_peripheral_std_uart)
#define TFM_PERIPHERAL_FPGA_IO (&tfm_peripheral_fpga_io)
diff --git a/platform/ext/target/mps2/fvp_sse300/spm_hal.c b/platform/ext/target/mps2/fvp_sse300/spm_hal.c
index 7237bfb..6b2d8a6 100644
--- a/platform/ext/target/mps2/fvp_sse300/spm_hal.c
+++ b/platform/ext/target/mps2/fvp_sse300/spm_hal.c
@@ -28,7 +28,7 @@
enum tfm_plat_err_t tfm_spm_hal_configure_default_isolation(
uint32_t partition_idx,
- const struct tfm_spm_partition_platform_data_t *platform_data)
+ 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);
diff --git a/platform/ext/target/mps2/fvp_sse300/target_cfg.c b/platform/ext/target/mps2/fvp_sse300/target_cfg.c
index e36ddd4..7176616 100644
--- a/platform/ext/target/mps2/fvp_sse300/target_cfg.c
+++ b/platform/ext/target/mps2/fvp_sse300/target_cfg.c
@@ -112,28 +112,28 @@
#define All_SEL_STATUS (SPNIDEN_SEL_STATUS | SPIDEN_SEL_STATUS | \
NIDEN_SEL_STATUS | DBGEN_SEL_STATUS)
-struct tfm_spm_partition_platform_data_t tfm_peripheral_std_uart = {
+struct platform_data_t tfm_peripheral_std_uart = {
UART0_CMSDK_BASE_NS,
UART0_CMSDK_BASE_NS + 0xFFF,
PPC_SP_DO_NOT_CONFIGURE,
-1
};
-struct tfm_spm_partition_platform_data_t tfm_peripheral_uart1 = {
+struct platform_data_t tfm_peripheral_uart1 = {
UART1_CMSDK_BASE_S,
UART1_CMSDK_BASE_S + 0xFFF,
PPC_SP_PERIPH_EXP1,
UART1_PERIPH_PPCEXP1_POS_MASK
};
-struct tfm_spm_partition_platform_data_t tfm_peripheral_fpga_io = {
+struct platform_data_t tfm_peripheral_fpga_io = {
MPS2_IO_FPGAIO_BASE_S,
MPS2_IO_FPGAIO_BASE_S + 0xFFF,
PPC_SP_PERIPH_EXP2,
FPGA_IO_PERIPH_PPCEXP2_POS_MASK
};
-struct tfm_spm_partition_platform_data_t tfm_peripheral_timer0 = {
+struct platform_data_t tfm_peripheral_timer0 = {
SYSTIMER0_ARMV8_M_BASE_S,
SYSTIMER0_ARMV8_M_BASE_S + 0xFFF,
PPC_SP_PERIPH0,
diff --git a/platform/ext/target/mps2/fvp_sse300/target_cfg.h b/platform/ext/target/mps2/fvp_sse300/target_cfg.h
index af6a907..6a8c97e 100644
--- a/platform/ext/target/mps2/fvp_sse300/target_cfg.h
+++ b/platform/ext/target/mps2/fvp_sse300/target_cfg.h
@@ -62,7 +62,7 @@
/**
* \brief Holds the data necessary to do isolation for a specific peripheral.
*/
-struct tfm_spm_partition_platform_data_t {
+struct platform_data_t {
uint32_t periph_start;
uint32_t periph_limit;
enum ppc_bank_e periph_ppc_bank;
diff --git a/platform/ext/target/mps2/fvp_sse300/tfm_peripherals_def.h b/platform/ext/target/mps2/fvp_sse300/tfm_peripherals_def.h
index b8d52e0..ae21ca2 100644
--- a/platform/ext/target/mps2/fvp_sse300/tfm_peripherals_def.h
+++ b/platform/ext/target/mps2/fvp_sse300/tfm_peripherals_def.h
@@ -20,12 +20,12 @@
#define FF_TEST_UART_IRQ (UARTTX2_IRQn)
#define FF_TEST_UART_IRQ_Handler UARTTX2_Handler
-struct tfm_spm_partition_platform_data_t;
+struct platform_data_t;
-extern struct tfm_spm_partition_platform_data_t tfm_peripheral_std_uart;
-extern struct tfm_spm_partition_platform_data_t tfm_peripheral_uart1;
-extern struct tfm_spm_partition_platform_data_t tfm_peripheral_fpga_io;
-extern struct tfm_spm_partition_platform_data_t tfm_peripheral_timer0;
+extern struct platform_data_t tfm_peripheral_std_uart;
+extern struct platform_data_t tfm_peripheral_uart1;
+extern struct platform_data_t tfm_peripheral_fpga_io;
+extern struct platform_data_t tfm_peripheral_timer0;
#define TFM_PERIPHERAL_STD_UART (&tfm_peripheral_std_uart)
#define TFM_PERIPHERAL_UART1 (&tfm_peripheral_uart1)
@@ -33,11 +33,11 @@
#define TFM_PERIPHERAL_TIMER0 (&tfm_peripheral_timer0)
#ifdef PSA_API_TEST_IPC
-extern struct tfm_spm_partition_platform_data_t tfm_peripheral_FF_TEST_UART_REGION;
-extern struct tfm_spm_partition_platform_data_t tfm_peripheral_FF_TEST_WATCHDOG_REGION;
-extern struct tfm_spm_partition_platform_data_t tfm_peripheral_FF_TEST_NVMEM_REGION;
-extern struct tfm_spm_partition_platform_data_t tfm_peripheral_FF_TEST_SERVER_PARTITION_MMIO;
-extern struct tfm_spm_partition_platform_data_t tfm_peripheral_FF_TEST_DRIVER_PARTITION_MMIO;
+extern struct platform_data_t tfm_peripheral_FF_TEST_UART_REGION;
+extern struct platform_data_t tfm_peripheral_FF_TEST_WATCHDOG_REGION;
+extern struct platform_data_t tfm_peripheral_FF_TEST_NVMEM_REGION;
+extern struct platform_data_t tfm_peripheral_FF_TEST_SERVER_PARTITION_MMIO;
+extern struct platform_data_t tfm_peripheral_FF_TEST_DRIVER_PARTITION_MMIO;
#define FF_TEST_UART_REGION (&tfm_peripheral_FF_TEST_UART_REGION)
#define FF_TEST_WATCHDOG_REGION (&tfm_peripheral_FF_TEST_WATCHDOG_REGION)
#define FF_TEST_NVMEM_REGION (&tfm_peripheral_FF_TEST_NVMEM_REGION)
diff --git a/platform/ext/target/mps2/sse-200_aws/spm_hal.c b/platform/ext/target/mps2/sse-200_aws/spm_hal.c
index 3fbb47d..d69a879 100644
--- a/platform/ext/target/mps2/sse-200_aws/spm_hal.c
+++ b/platform/ext/target/mps2/sse-200_aws/spm_hal.c
@@ -29,7 +29,7 @@
enum tfm_plat_err_t tfm_spm_hal_configure_default_isolation(
uint32_t partition_idx,
- const struct tfm_spm_partition_platform_data_t *platform_data)
+ const struct platform_data_t *platform_data)
{
bool privileged = tfm_is_partition_privileged(partition_idx);
diff --git a/platform/ext/target/mps2/sse-200_aws/target_cfg.c b/platform/ext/target/mps2/sse-200_aws/target_cfg.c
index 1bfb388..880aeeb 100644
--- a/platform/ext/target/mps2/sse-200_aws/target_cfg.c
+++ b/platform/ext/target/mps2/sse-200_aws/target_cfg.c
@@ -88,21 +88,21 @@
#define All_SEL_STATUS (SPNIDEN_SEL_STATUS | SPIDEN_SEL_STATUS | \
NIDEN_SEL_STATUS | DBGEN_SEL_STATUS)
-struct tfm_spm_partition_platform_data_t tfm_peripheral_std_uart = {
+struct platform_data_t tfm_peripheral_std_uart = {
UART0_BASE_NS,
UART0_BASE_NS + 0xFFF,
PPC_SP_DO_NOT_CONFIGURE,
-1
};
-struct tfm_spm_partition_platform_data_t tfm_peripheral_fpga_io = {
+struct platform_data_t tfm_peripheral_fpga_io = {
MPS2_IO_FPGAIO_BASE_S,
MPS2_IO_FPGAIO_BASE_S + 0xFFF,
PPC_SP_APB_PPC_EXP2,
CMSDK_FPGA_IO_PPC_POS
};
-struct tfm_spm_partition_platform_data_t tfm_peripheral_timer0 = {
+struct platform_data_t tfm_peripheral_timer0 = {
CMSDK_TIMER0_BASE_S,
CMSDK_TIMER1_BASE_S - 1,
PPC_SP_APB_PPC0,
diff --git a/platform/ext/target/mps2/sse-200_aws/target_cfg.h b/platform/ext/target/mps2/sse-200_aws/target_cfg.h
index ec598a8..4498728 100644
--- a/platform/ext/target/mps2/sse-200_aws/target_cfg.h
+++ b/platform/ext/target/mps2/sse-200_aws/target_cfg.h
@@ -68,7 +68,7 @@
/**
* \brief Holds the data necessary to do isolation for a specific peripheral.
*/
-struct tfm_spm_partition_platform_data_t
+struct platform_data_t
{
uint32_t periph_start;
uint32_t periph_limit;
diff --git a/platform/ext/target/mps2/sse-200_aws/tfm_peripherals_def.h b/platform/ext/target/mps2/sse-200_aws/tfm_peripherals_def.h
index b9b4e7a..332ee90 100644
--- a/platform/ext/target/mps2/sse-200_aws/tfm_peripherals_def.h
+++ b/platform/ext/target/mps2/sse-200_aws/tfm_peripherals_def.h
@@ -18,11 +18,11 @@
#define TFM_TIMER0_IRQ (TIMER0_IRQn)
#define TFM_TIMER1_IRQ (TIMER1_IRQn)
-struct tfm_spm_partition_platform_data_t;
+struct platform_data_t;
-extern struct tfm_spm_partition_platform_data_t tfm_peripheral_std_uart;
-extern struct tfm_spm_partition_platform_data_t tfm_peripheral_fpga_io;
-extern struct tfm_spm_partition_platform_data_t tfm_peripheral_timer0;
+extern struct platform_data_t tfm_peripheral_std_uart;
+extern struct platform_data_t tfm_peripheral_fpga_io;
+extern struct platform_data_t tfm_peripheral_timer0;
#define TFM_PERIPHERAL_STD_UART (&tfm_peripheral_std_uart)
#define TFM_PERIPHERAL_FPGA_IO (&tfm_peripheral_fpga_io)
diff --git a/platform/ext/target/mps3/an524/spm_hal.c b/platform/ext/target/mps3/an524/spm_hal.c
index de9d59a..8abe9d8 100644
--- a/platform/ext/target/mps3/an524/spm_hal.c
+++ b/platform/ext/target/mps3/an524/spm_hal.c
@@ -34,7 +34,7 @@
enum tfm_plat_err_t tfm_spm_hal_configure_default_isolation(
uint32_t partition_idx,
- const struct tfm_spm_partition_platform_data_t *platform_data)
+ const struct platform_data_t *platform_data)
{
bool privileged = tfm_is_partition_privileged(partition_idx);
diff --git a/platform/ext/target/mps3/an524/target_cfg.c b/platform/ext/target/mps3/an524/target_cfg.c
index cdc3fee..0648984 100644
--- a/platform/ext/target/mps3/an524/target_cfg.c
+++ b/platform/ext/target/mps3/an524/target_cfg.c
@@ -92,7 +92,7 @@
*/
#define SCB_AIRCR_WRITE_MASK ((0x5FAUL << SCB_AIRCR_VECTKEY_Pos))
-struct tfm_spm_partition_platform_data_t tfm_peripheral_std_uart = {
+struct platform_data_t tfm_peripheral_std_uart = {
UART1_BASE_S,
UART1_BASE_S + 0xFFF,
PPC_SP_APB_PPC_EXP2,
@@ -119,7 +119,7 @@
#define PPC_BANK_COUNT (sizeof(ppc_bank_drivers)/sizeof(ppc_bank_drivers[0]))
-struct tfm_spm_partition_platform_data_t tfm_peripheral_timer0 = {
+struct platform_data_t tfm_peripheral_timer0 = {
CMSDK_TIMER0_BASE_S,
CMSDK_TIMER1_BASE_S - 1,
PPC_SP_APB_PPC0,
diff --git a/platform/ext/target/mps3/an524/target_cfg.h b/platform/ext/target/mps3/an524/target_cfg.h
index 6cc3ed1..8246b7a 100644
--- a/platform/ext/target/mps3/an524/target_cfg.h
+++ b/platform/ext/target/mps3/an524/target_cfg.h
@@ -57,7 +57,7 @@
/**
* \brief Holds the data necessary to do isolation for a specific peripheral.
*/
-struct tfm_spm_partition_platform_data_t {
+struct platform_data_t {
uint32_t periph_start;
uint32_t periph_limit;
enum ppc_bank_e periph_ppc_bank;
diff --git a/platform/ext/target/mps3/an524/tfm_peripherals_def.h b/platform/ext/target/mps3/an524/tfm_peripherals_def.h
index a6a8e55..643046c 100644
--- a/platform/ext/target/mps3/an524/tfm_peripherals_def.h
+++ b/platform/ext/target/mps3/an524/tfm_peripherals_def.h
@@ -18,10 +18,10 @@
#define TFM_TIMER0_IRQ (TIMER0_IRQn)
#define TFM_TIMER1_IRQ (TIMER1_IRQn)
-struct tfm_spm_partition_platform_data_t;
+struct platform_data_t;
-extern struct tfm_spm_partition_platform_data_t tfm_peripheral_std_uart;
-extern struct tfm_spm_partition_platform_data_t tfm_peripheral_timer0;
+extern struct platform_data_t tfm_peripheral_std_uart;
+extern struct platform_data_t tfm_peripheral_timer0;
#define TFM_PERIPHERAL_STD_UART (&tfm_peripheral_std_uart)
#define TFM_PERIPHERAL_TIMER0 (&tfm_peripheral_timer0)
diff --git a/platform/ext/target/mps3/fvp_sse300/spm_hal.c b/platform/ext/target/mps3/fvp_sse300/spm_hal.c
index ecfc69f..840deac 100644
--- a/platform/ext/target/mps3/fvp_sse300/spm_hal.c
+++ b/platform/ext/target/mps3/fvp_sse300/spm_hal.c
@@ -30,7 +30,7 @@
enum tfm_plat_err_t tfm_spm_hal_configure_default_isolation(
uint32_t partition_idx,
- const struct tfm_spm_partition_platform_data_t *platform_data)
+ 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);
diff --git a/platform/ext/target/mps3/fvp_sse300/target_cfg.c b/platform/ext/target/mps3/fvp_sse300/target_cfg.c
index ada8afa..3059772 100644
--- a/platform/ext/target/mps3/fvp_sse300/target_cfg.c
+++ b/platform/ext/target/mps3/fvp_sse300/target_cfg.c
@@ -109,21 +109,21 @@
#define All_SEL_STATUS (SPNIDEN_SEL_STATUS | SPIDEN_SEL_STATUS | \
NIDEN_SEL_STATUS | DBGEN_SEL_STATUS)
-struct tfm_spm_partition_platform_data_t tfm_peripheral_std_uart = {
+struct platform_data_t tfm_peripheral_std_uart = {
UART0_BASE_NS,
UART0_BASE_NS + 0xFFF,
PPC_SP_DO_NOT_CONFIGURE,
-1
};
-struct tfm_spm_partition_platform_data_t tfm_peripheral_fpga_io = {
+struct platform_data_t tfm_peripheral_fpga_io = {
FPGA_IO_BASE_S,
FPGA_IO_BASE_S + 0xFFF,
PPC_SP_PERIPH_EXP2,
FPGA_IO_PERIPH_PPCEXP2_POS_MASK
};
-struct tfm_spm_partition_platform_data_t tfm_peripheral_timer0 = {
+struct platform_data_t tfm_peripheral_timer0 = {
SYSTIMER0_ARMV8_M_BASE_S,
SYSTIMER0_ARMV8_M_BASE_S + 0xFFF,
PPC_SP_PERIPH0,
diff --git a/platform/ext/target/mps3/fvp_sse300/target_cfg.h b/platform/ext/target/mps3/fvp_sse300/target_cfg.h
index f18c8e5..711e4f3 100644
--- a/platform/ext/target/mps3/fvp_sse300/target_cfg.h
+++ b/platform/ext/target/mps3/fvp_sse300/target_cfg.h
@@ -59,7 +59,7 @@
/**
* \brief Holds the data necessary to do isolation for a specific peripheral.
*/
-struct tfm_spm_partition_platform_data_t {
+struct platform_data_t {
uint32_t periph_start;
uint32_t periph_limit;
enum ppc_bank_e periph_ppc_bank;
diff --git a/platform/ext/target/mps3/fvp_sse300/tfm_peripherals_def.h b/platform/ext/target/mps3/fvp_sse300/tfm_peripherals_def.h
index ca169b0..1c00be5 100644
--- a/platform/ext/target/mps3/fvp_sse300/tfm_peripherals_def.h
+++ b/platform/ext/target/mps3/fvp_sse300/tfm_peripherals_def.h
@@ -18,22 +18,22 @@
#define TFM_TIMER0_IRQ (TIMER0_IRQn)
#define TFM_TIMER1_IRQ (TIMER1_IRQn)
-struct tfm_spm_partition_platform_data_t;
+struct platform_data_t;
-extern struct tfm_spm_partition_platform_data_t tfm_peripheral_std_uart;
-extern struct tfm_spm_partition_platform_data_t tfm_peripheral_fpga_io;
-extern struct tfm_spm_partition_platform_data_t tfm_peripheral_timer0;
+extern struct platform_data_t tfm_peripheral_std_uart;
+extern struct platform_data_t tfm_peripheral_fpga_io;
+extern struct platform_data_t tfm_peripheral_timer0;
#define TFM_PERIPHERAL_STD_UART (&tfm_peripheral_std_uart)
#define TFM_PERIPHERAL_FPGA_IO (&tfm_peripheral_fpga_io)
#define TFM_PERIPHERAL_TIMER0 (&tfm_peripheral_timer0)
#ifdef PSA_API_TEST_IPC
-extern struct tfm_spm_partition_platform_data_t tfm_peripheral_FF_TEST_UART_REGION;
-extern struct tfm_spm_partition_platform_data_t tfm_peripheral_FF_TEST_WATCHDOG_REGION;
-extern struct tfm_spm_partition_platform_data_t tfm_peripheral_FF_TEST_NVMEM_REGION;
-extern struct tfm_spm_partition_platform_data_t tfm_peripheral_FF_TEST_SERVER_PARTITION_MMIO;
-extern struct tfm_spm_partition_platform_data_t tfm_peripheral_FF_TEST_DRIVER_PARTITION_MMIO;
+extern struct platform_data_t tfm_peripheral_FF_TEST_UART_REGION;
+extern struct platform_data_t tfm_peripheral_FF_TEST_WATCHDOG_REGION;
+extern struct platform_data_t tfm_peripheral_FF_TEST_NVMEM_REGION;
+extern struct platform_data_t tfm_peripheral_FF_TEST_SERVER_PARTITION_MMIO;
+extern struct platform_data_t tfm_peripheral_FF_TEST_DRIVER_PARTITION_MMIO;
#define FF_TEST_UART_REGION (&tfm_peripheral_FF_TEST_UART_REGION)
#define FF_TEST_WATCHDOG_REGION (&tfm_peripheral_FF_TEST_WATCHDOG_REGION)
#define FF_TEST_NVMEM_REGION (&tfm_peripheral_FF_TEST_NVMEM_REGION)
diff --git a/platform/ext/target/musca_a/spm_hal.c b/platform/ext/target/musca_a/spm_hal.c
index 8f157d4..1fb4ed1 100644
--- a/platform/ext/target/musca_a/spm_hal.c
+++ b/platform/ext/target/musca_a/spm_hal.c
@@ -34,7 +34,7 @@
enum tfm_plat_err_t tfm_spm_hal_configure_default_isolation(
uint32_t partition_idx,
- const struct tfm_spm_partition_platform_data_t *platform_data)
+ 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)
diff --git a/platform/ext/target/musca_a/target_cfg.c b/platform/ext/target/musca_a/target_cfg.c
index 06ebd44..18ff673 100644
--- a/platform/ext/target/musca_a/target_cfg.c
+++ b/platform/ext/target/musca_a/target_cfg.c
@@ -83,14 +83,14 @@
#define All_SEL_STATUS (SPNIDEN_SEL_STATUS | SPIDEN_SEL_STATUS | \
NIDEN_SEL_STATUS | DBGEN_SEL_STATUS)
-struct tfm_spm_partition_platform_data_t tfm_peripheral_std_uart = {
+struct platform_data_t tfm_peripheral_std_uart = {
MUSCA_UART1_NS_BASE,
MUSCA_UART1_NS_BASE + 0xFFF,
PPC_SP_DO_NOT_CONFIGURE,
-1
};
-struct tfm_spm_partition_platform_data_t tfm_peripheral_timer0 = {
+struct platform_data_t tfm_peripheral_timer0 = {
MUSCA_CMSDK_TIMER0_S_BASE,
MUSCA_CMSDK_TIMER1_S_BASE - 1,
PPC_SP_APB_PPC0,
@@ -104,7 +104,7 @@
* security.
*/
-struct tfm_spm_partition_platform_data_t
+struct platform_data_t
tfm_peripheral_FF_TEST_UART_REGION = {
MUSCA_UART1_NS_BASE,
MUSCA_UART1_NS_BASE + 0xFFF,
@@ -112,7 +112,7 @@
-1
};
-struct tfm_spm_partition_platform_data_t
+struct platform_data_t
tfm_peripheral_FF_TEST_WATCHDOG_REGION = {
MUSCA_CMSDK_WATCHDOG_S_BASE,
MUSCA_CMSDK_WATCHDOG_S_BASE + 0xFFF,
@@ -127,7 +127,7 @@
#define FF_TEST_DRIVER_PARTITION_MMIO_START 0x30017E00
#define FF_TEST_DRIVER_PARTITION_MMIO_END 0x30017F00
-struct tfm_spm_partition_platform_data_t
+struct platform_data_t
tfm_peripheral_FF_TEST_NVMEM_REGION = {
FF_TEST_NVMEM_REGION_START,
FF_TEST_NVMEM_REGION_END,
@@ -135,7 +135,7 @@
-1
};
-struct tfm_spm_partition_platform_data_t
+struct platform_data_t
tfm_peripheral_FF_TEST_SERVER_PARTITION_MMIO = {
FF_TEST_SERVER_PARTITION_MMIO_START,
FF_TEST_SERVER_PARTITION_MMIO_END,
@@ -143,7 +143,7 @@
-1
};
-struct tfm_spm_partition_platform_data_t
+struct platform_data_t
tfm_peripheral_FF_TEST_DRIVER_PARTITION_MMIO = {
FF_TEST_DRIVER_PARTITION_MMIO_START,
FF_TEST_DRIVER_PARTITION_MMIO_END,
diff --git a/platform/ext/target/musca_a/target_cfg.h b/platform/ext/target/musca_a/target_cfg.h
index 4b28a48..86796a9 100644
--- a/platform/ext/target/musca_a/target_cfg.h
+++ b/platform/ext/target/musca_a/target_cfg.h
@@ -63,7 +63,7 @@
/**
* \brief Holds the data necessary to do isolation for a specific peripheral.
*/
-struct tfm_spm_partition_platform_data_t
+struct platform_data_t
{
uint32_t periph_start;
uint32_t periph_limit;
diff --git a/platform/ext/target/musca_a/tfm_peripherals_def.h b/platform/ext/target/musca_a/tfm_peripherals_def.h
index 31a9bc7..a0887ac 100644
--- a/platform/ext/target/musca_a/tfm_peripherals_def.h
+++ b/platform/ext/target/musca_a/tfm_peripherals_def.h
@@ -20,21 +20,21 @@
#define FF_TEST_UART_IRQ (UART1_Tx_IRQn)
#define FF_TEST_UART_IRQ_Handler UARTTX1_Handler
-struct tfm_spm_partition_platform_data_t;
+struct platform_data_t;
-extern struct tfm_spm_partition_platform_data_t tfm_peripheral_std_uart;
-extern struct tfm_spm_partition_platform_data_t tfm_peripheral_timer0;
+extern struct platform_data_t tfm_peripheral_std_uart;
+extern struct platform_data_t tfm_peripheral_timer0;
#define TFM_PERIPHERAL_STD_UART (&tfm_peripheral_std_uart)
#define TFM_PERIPHERAL_TIMER0 (&tfm_peripheral_timer0)
#define TFM_PERIPHERAL_FPGA_IO (0)
#ifdef PSA_API_TEST_IPC
-extern struct tfm_spm_partition_platform_data_t tfm_peripheral_FF_TEST_UART_REGION;
-extern struct tfm_spm_partition_platform_data_t tfm_peripheral_FF_TEST_WATCHDOG_REGION;
-extern struct tfm_spm_partition_platform_data_t tfm_peripheral_FF_TEST_NVMEM_REGION;
-extern struct tfm_spm_partition_platform_data_t tfm_peripheral_FF_TEST_SERVER_PARTITION_MMIO;
-extern struct tfm_spm_partition_platform_data_t tfm_peripheral_FF_TEST_DRIVER_PARTITION_MMIO;
+extern struct platform_data_t tfm_peripheral_FF_TEST_UART_REGION;
+extern struct platform_data_t tfm_peripheral_FF_TEST_WATCHDOG_REGION;
+extern struct platform_data_t tfm_peripheral_FF_TEST_NVMEM_REGION;
+extern struct platform_data_t tfm_peripheral_FF_TEST_SERVER_PARTITION_MMIO;
+extern struct platform_data_t tfm_peripheral_FF_TEST_DRIVER_PARTITION_MMIO;
#define FF_TEST_UART_REGION (&tfm_peripheral_FF_TEST_UART_REGION)
#define FF_TEST_WATCHDOG_REGION (&tfm_peripheral_FF_TEST_WATCHDOG_REGION)
#define FF_TEST_NVMEM_REGION (&tfm_peripheral_FF_TEST_NVMEM_REGION)
diff --git a/platform/ext/target/musca_b1/secure_enclave/spm_hal.c b/platform/ext/target/musca_b1/secure_enclave/spm_hal.c
index 9c34ff2..b800078 100644
--- a/platform/ext/target/musca_b1/secure_enclave/spm_hal.c
+++ b/platform/ext/target/musca_b1/secure_enclave/spm_hal.c
@@ -22,7 +22,7 @@
enum tfm_plat_err_t tfm_spm_hal_configure_default_isolation(
uint32_t partition_idx,
- const struct tfm_spm_partition_platform_data_t *platform_data)
+ const struct platform_data_t *platform_data)
{
/* Nothing to do, there is no isolation HW in this platform to be
* configured by Secure Enclave */
diff --git a/platform/ext/target/musca_b1/sse_200/spm_hal.c b/platform/ext/target/musca_b1/sse_200/spm_hal.c
index 2f006e1..42c10cf 100644
--- a/platform/ext/target/musca_b1/sse_200/spm_hal.c
+++ b/platform/ext/target/musca_b1/sse_200/spm_hal.c
@@ -34,7 +34,7 @@
enum tfm_plat_err_t tfm_spm_hal_configure_default_isolation(
uint32_t partition_idx,
- const struct tfm_spm_partition_platform_data_t *platform_data)
+ 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)
diff --git a/platform/ext/target/musca_b1/sse_200/target_cfg.c b/platform/ext/target/musca_b1/sse_200/target_cfg.c
index 3b0f42f..89f44d0 100644
--- a/platform/ext/target/musca_b1/sse_200/target_cfg.c
+++ b/platform/ext/target/musca_b1/sse_200/target_cfg.c
@@ -103,7 +103,7 @@
#define All_SEL_STATUS (SPNIDEN_SEL_STATUS | SPIDEN_SEL_STATUS | \
NIDEN_SEL_STATUS | DBGEN_SEL_STATUS)
-struct tfm_spm_partition_platform_data_t tfm_peripheral_std_uart = {
+struct platform_data_t tfm_peripheral_std_uart = {
MUSCA_B1_UART1_NS_BASE,
MUSCA_B1_UART1_NS_BASE + 0xFFF,
PPC_SP_DO_NOT_CONFIGURE,
@@ -130,7 +130,7 @@
#define PPC_BANK_COUNT \
(sizeof(ppc_bank_drivers)/sizeof(ppc_bank_drivers[0]))
-struct tfm_spm_partition_platform_data_t tfm_peripheral_timer0 = {
+struct platform_data_t tfm_peripheral_timer0 = {
MUSCA_B1_CMSDK_TIMER0_S_BASE,
MUSCA_B1_CMSDK_TIMER1_S_BASE - 1,
PPC_SP_APB_PPC0,
@@ -144,7 +144,7 @@
* security.
*/
-struct tfm_spm_partition_platform_data_t
+struct platform_data_t
tfm_peripheral_FF_TEST_UART_REGION = {
MUSCA_B1_UART1_NS_BASE,
MUSCA_B1_UART1_NS_BASE + 0xFFF,
@@ -152,7 +152,7 @@
-1
};
-struct tfm_spm_partition_platform_data_t
+struct platform_data_t
tfm_peripheral_FF_TEST_WATCHDOG_REGION = {
MUSCA_B1_CMSDK_WATCHDOG_S_BASE,
MUSCA_B1_CMSDK_WATCHDOG_S_BASE + 0xFFF,
@@ -167,7 +167,7 @@
#define FF_TEST_DRIVER_PARTITION_MMIO_START 0x3003FE00
#define FF_TEST_DRIVER_PARTITION_MMIO_END 0x3003FF00
-struct tfm_spm_partition_platform_data_t
+struct platform_data_t
tfm_peripheral_FF_TEST_NVMEM_REGION = {
FF_TEST_NVMEM_REGION_START,
FF_TEST_NVMEM_REGION_END,
@@ -175,7 +175,7 @@
-1
};
-struct tfm_spm_partition_platform_data_t
+struct platform_data_t
tfm_peripheral_FF_TEST_SERVER_PARTITION_MMIO = {
FF_TEST_SERVER_PARTITION_MMIO_START,
FF_TEST_SERVER_PARTITION_MMIO_END,
@@ -183,7 +183,7 @@
-1
};
-struct tfm_spm_partition_platform_data_t
+struct platform_data_t
tfm_peripheral_FF_TEST_DRIVER_PARTITION_MMIO = {
FF_TEST_DRIVER_PARTITION_MMIO_START,
FF_TEST_DRIVER_PARTITION_MMIO_END,
diff --git a/platform/ext/target/musca_b1/sse_200/target_cfg.h b/platform/ext/target/musca_b1/sse_200/target_cfg.h
index f5bb406..fba2b4f 100644
--- a/platform/ext/target/musca_b1/sse_200/target_cfg.h
+++ b/platform/ext/target/musca_b1/sse_200/target_cfg.h
@@ -71,7 +71,7 @@
/**
* \brief Holds the data necessary to do isolation for a specific peripheral.
*/
-struct tfm_spm_partition_platform_data_t
+struct platform_data_t
{
uint32_t periph_start;
uint32_t periph_limit;
diff --git a/platform/ext/target/musca_b1/sse_200/tfm_peripherals_def.h b/platform/ext/target/musca_b1/sse_200/tfm_peripherals_def.h
index 31a9bc7..a0887ac 100644
--- a/platform/ext/target/musca_b1/sse_200/tfm_peripherals_def.h
+++ b/platform/ext/target/musca_b1/sse_200/tfm_peripherals_def.h
@@ -20,21 +20,21 @@
#define FF_TEST_UART_IRQ (UART1_Tx_IRQn)
#define FF_TEST_UART_IRQ_Handler UARTTX1_Handler
-struct tfm_spm_partition_platform_data_t;
+struct platform_data_t;
-extern struct tfm_spm_partition_platform_data_t tfm_peripheral_std_uart;
-extern struct tfm_spm_partition_platform_data_t tfm_peripheral_timer0;
+extern struct platform_data_t tfm_peripheral_std_uart;
+extern struct platform_data_t tfm_peripheral_timer0;
#define TFM_PERIPHERAL_STD_UART (&tfm_peripheral_std_uart)
#define TFM_PERIPHERAL_TIMER0 (&tfm_peripheral_timer0)
#define TFM_PERIPHERAL_FPGA_IO (0)
#ifdef PSA_API_TEST_IPC
-extern struct tfm_spm_partition_platform_data_t tfm_peripheral_FF_TEST_UART_REGION;
-extern struct tfm_spm_partition_platform_data_t tfm_peripheral_FF_TEST_WATCHDOG_REGION;
-extern struct tfm_spm_partition_platform_data_t tfm_peripheral_FF_TEST_NVMEM_REGION;
-extern struct tfm_spm_partition_platform_data_t tfm_peripheral_FF_TEST_SERVER_PARTITION_MMIO;
-extern struct tfm_spm_partition_platform_data_t tfm_peripheral_FF_TEST_DRIVER_PARTITION_MMIO;
+extern struct platform_data_t tfm_peripheral_FF_TEST_UART_REGION;
+extern struct platform_data_t tfm_peripheral_FF_TEST_WATCHDOG_REGION;
+extern struct platform_data_t tfm_peripheral_FF_TEST_NVMEM_REGION;
+extern struct platform_data_t tfm_peripheral_FF_TEST_SERVER_PARTITION_MMIO;
+extern struct platform_data_t tfm_peripheral_FF_TEST_DRIVER_PARTITION_MMIO;
#define FF_TEST_UART_REGION (&tfm_peripheral_FF_TEST_UART_REGION)
#define FF_TEST_WATCHDOG_REGION (&tfm_peripheral_FF_TEST_WATCHDOG_REGION)
#define FF_TEST_NVMEM_REGION (&tfm_peripheral_FF_TEST_NVMEM_REGION)
diff --git a/platform/ext/target/musca_s1/spm_hal.c b/platform/ext/target/musca_s1/spm_hal.c
index ca9f42c..dba2177 100644
--- a/platform/ext/target/musca_s1/spm_hal.c
+++ b/platform/ext/target/musca_s1/spm_hal.c
@@ -26,7 +26,7 @@
enum tfm_plat_err_t tfm_spm_hal_configure_default_isolation(
uint32_t partition_idx,
- const struct tfm_spm_partition_platform_data_t *platform_data)
+ const struct platform_data_t *platform_data)
{
bool privileged = tfm_is_partition_privileged(partition_idx);
diff --git a/platform/ext/target/musca_s1/target_cfg.c b/platform/ext/target/musca_s1/target_cfg.c
index 46635f4..776e910 100644
--- a/platform/ext/target/musca_s1/target_cfg.c
+++ b/platform/ext/target/musca_s1/target_cfg.c
@@ -112,14 +112,14 @@
(sizeof(ppc_bank_drivers)/sizeof(ppc_bank_drivers[0]))
-struct tfm_spm_partition_platform_data_t tfm_peripheral_std_uart = {
+struct platform_data_t tfm_peripheral_std_uart = {
MUSCA_S1_UART1_NS_BASE,
MUSCA_S1_UART1_NS_BASE + 0xFFF,
PPC_SP_DO_NOT_CONFIGURE,
-1
};
-struct tfm_spm_partition_platform_data_t tfm_peripheral_timer0 = {
+struct platform_data_t tfm_peripheral_timer0 = {
MUSCA_S1_CMSDK_TIMER0_S_BASE,
MUSCA_S1_CMSDK_TIMER1_S_BASE - 1,
PPC_SP_APB_PPC0,
diff --git a/platform/ext/target/musca_s1/target_cfg.h b/platform/ext/target/musca_s1/target_cfg.h
index 9ca438a..6c95b19 100644
--- a/platform/ext/target/musca_s1/target_cfg.h
+++ b/platform/ext/target/musca_s1/target_cfg.h
@@ -67,7 +67,7 @@
/**
* \brief Holds the data necessary to do isolation for a specific peripheral.
*/
-struct tfm_spm_partition_platform_data_t
+struct platform_data_t
{
uint32_t periph_start;
uint32_t periph_limit;
diff --git a/platform/ext/target/musca_s1/tfm_peripherals_def.h b/platform/ext/target/musca_s1/tfm_peripherals_def.h
index 6f70235..ce39001 100644
--- a/platform/ext/target/musca_s1/tfm_peripherals_def.h
+++ b/platform/ext/target/musca_s1/tfm_peripherals_def.h
@@ -18,10 +18,10 @@
#define TFM_TIMER0_IRQ (TIMER0_IRQn)
#define TFM_TIMER1_IRQ (TIMER1_IRQn)
-struct tfm_spm_partition_platform_data_t;
+struct platform_data_t;
-extern struct tfm_spm_partition_platform_data_t tfm_peripheral_std_uart;
-extern struct tfm_spm_partition_platform_data_t tfm_peripheral_timer0;
+extern struct platform_data_t tfm_peripheral_std_uart;
+extern struct platform_data_t tfm_peripheral_timer0;
#define TFM_PERIPHERAL_STD_UART (&tfm_peripheral_std_uart)
#define TFM_PERIPHERAL_TIMER0 (&tfm_peripheral_timer0)
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 913a215..d38100d 100644
--- a/platform/ext/target/nordic_nrf/common/core/spm_hal.c
+++ b/platform/ext/target/nordic_nrf/common/core/spm_hal.c
@@ -30,7 +30,7 @@
enum tfm_plat_err_t tfm_spm_hal_configure_default_isolation(
uint32_t partition_idx,
- const struct tfm_spm_partition_platform_data_t *platform_data)
+ const struct platform_data_t *platform_data)
{
if (!platform_data) {
return TFM_PLAT_ERR_INVALID_INPUT;
diff --git a/platform/ext/target/nordic_nrf/common/nrf5340/target_cfg.c b/platform/ext/target/nordic_nrf/common/nrf5340/target_cfg.c
index a6c8f0e..84b5887 100644
--- a/platform/ext/target/nordic_nrf/common/nrf5340/target_cfg.c
+++ b/platform/ext/target/nordic_nrf/common/nrf5340/target_cfg.c
@@ -27,12 +27,12 @@
#define PIN_XL1 0
#define PIN_XL2 1
-struct tfm_spm_partition_platform_data_t tfm_peripheral_timer0 = {
+struct platform_data_t tfm_peripheral_timer0 = {
NRF_TIMER0_S_BASE,
NRF_TIMER0_S_BASE + (sizeof(NRF_TIMER_Type) - 1),
};
-struct tfm_spm_partition_platform_data_t tfm_peripheral_std_uart = {
+struct platform_data_t tfm_peripheral_std_uart = {
NRF_UARTE1_S_BASE,
NRF_UARTE1_S_BASE + (sizeof(NRF_UARTE_Type) - 1),
};
diff --git a/platform/ext/target/nordic_nrf/common/nrf5340/target_cfg.h b/platform/ext/target/nordic_nrf/common/nrf5340/target_cfg.h
index 142896e..ab0434a 100644
--- a/platform/ext/target/nordic_nrf/common/nrf5340/target_cfg.h
+++ b/platform/ext/target/nordic_nrf/common/nrf5340/target_cfg.h
@@ -55,7 +55,7 @@
/**
* \brief Holds the data necessary to do isolation for a specific peripheral.
*/
-struct tfm_spm_partition_platform_data_t
+struct platform_data_t
{
uint32_t periph_start;
uint32_t periph_limit;
diff --git a/platform/ext/target/nordic_nrf/common/nrf5340/tfm_peripherals_def.h b/platform/ext/target/nordic_nrf/common/nrf5340/tfm_peripherals_def.h
index b30b8a3..bba6a81 100644
--- a/platform/ext/target/nordic_nrf/common/nrf5340/tfm_peripherals_def.h
+++ b/platform/ext/target/nordic_nrf/common/nrf5340/tfm_peripherals_def.h
@@ -19,10 +19,10 @@
#define TFM_TIMER0_IRQ (TIMER0_IRQn)
#define TFM_TIMER1_IRQ (TIMER1_IRQn)
-struct tfm_spm_partition_platform_data_t;
+struct platform_data_t;
-extern struct tfm_spm_partition_platform_data_t tfm_peripheral_std_uart;
-extern struct tfm_spm_partition_platform_data_t tfm_peripheral_timer0;
+extern struct platform_data_t tfm_peripheral_std_uart;
+extern struct platform_data_t tfm_peripheral_timer0;
#define TFM_PERIPHERAL_STD_UART (&tfm_peripheral_std_uart)
#define TFM_PERIPHERAL_TIMER0 (&tfm_peripheral_timer0)
diff --git a/platform/ext/target/nordic_nrf/common/nrf9160/target_cfg.c b/platform/ext/target/nordic_nrf/common/nrf9160/target_cfg.c
index d20508c..277e182 100644
--- a/platform/ext/target/nordic_nrf/common/nrf9160/target_cfg.c
+++ b/platform/ext/target/nordic_nrf/common/nrf9160/target_cfg.c
@@ -23,12 +23,12 @@
#include <spu.h>
#include <nrfx.h>
-struct tfm_spm_partition_platform_data_t tfm_peripheral_timer0 = {
+struct platform_data_t tfm_peripheral_timer0 = {
NRF_TIMER0_S_BASE,
NRF_TIMER0_S_BASE + (sizeof(NRF_TIMER_Type) - 1),
};
-struct tfm_spm_partition_platform_data_t tfm_peripheral_std_uart = {
+struct platform_data_t tfm_peripheral_std_uart = {
NRF_UARTE1_S_BASE,
NRF_UARTE1_S_BASE + (sizeof(NRF_UARTE_Type) - 1),
};
diff --git a/platform/ext/target/nordic_nrf/common/nrf9160/target_cfg.h b/platform/ext/target/nordic_nrf/common/nrf9160/target_cfg.h
index 7e08962..3261c7c 100644
--- a/platform/ext/target/nordic_nrf/common/nrf9160/target_cfg.h
+++ b/platform/ext/target/nordic_nrf/common/nrf9160/target_cfg.h
@@ -54,7 +54,7 @@
/**
* \brief Holds the data necessary to do isolation for a specific peripheral.
*/
-struct tfm_spm_partition_platform_data_t
+struct platform_data_t
{
uint32_t periph_start;
uint32_t periph_limit;
diff --git a/platform/ext/target/nordic_nrf/common/nrf9160/tfm_peripherals_def.h b/platform/ext/target/nordic_nrf/common/nrf9160/tfm_peripherals_def.h
index b30b8a3..bba6a81 100644
--- a/platform/ext/target/nordic_nrf/common/nrf9160/tfm_peripherals_def.h
+++ b/platform/ext/target/nordic_nrf/common/nrf9160/tfm_peripherals_def.h
@@ -19,10 +19,10 @@
#define TFM_TIMER0_IRQ (TIMER0_IRQn)
#define TFM_TIMER1_IRQ (TIMER1_IRQn)
-struct tfm_spm_partition_platform_data_t;
+struct platform_data_t;
-extern struct tfm_spm_partition_platform_data_t tfm_peripheral_std_uart;
-extern struct tfm_spm_partition_platform_data_t tfm_peripheral_timer0;
+extern struct platform_data_t tfm_peripheral_std_uart;
+extern struct platform_data_t tfm_peripheral_timer0;
#define TFM_PERIPHERAL_STD_UART (&tfm_peripheral_std_uart)
#define TFM_PERIPHERAL_TIMER0 (&tfm_peripheral_timer0)
diff --git a/platform/ext/target/nuvoton/m2351/spm_hal.c b/platform/ext/target/nuvoton/m2351/spm_hal.c
index 77143db..500593b 100644
--- a/platform/ext/target/nuvoton/m2351/spm_hal.c
+++ b/platform/ext/target/nuvoton/m2351/spm_hal.c
@@ -23,7 +23,7 @@
enum tfm_plat_err_t tfm_spm_hal_configure_default_isolation(
uint32_t partition_idx,
- const struct tfm_spm_partition_platform_data_t *platform_data)
+ const struct platform_data_t *platform_data)
{
bool privileged = tfm_is_partition_privileged(partition_idx);
diff --git a/platform/ext/target/nuvoton/m2351/target_cfg.c b/platform/ext/target/nuvoton/m2351/target_cfg.c
index abcab48..efd1b23 100644
--- a/platform/ext/target/nuvoton/m2351/target_cfg.c
+++ b/platform/ext/target/nuvoton/m2351/target_cfg.c
@@ -94,21 +94,21 @@
#define All_SEL_STATUS (SPNIDEN_SEL_STATUS | SPIDEN_SEL_STATUS | \
NIDEN_SEL_STATUS | DBGEN_SEL_STATUS)
-struct tfm_spm_partition_platform_data_t tfm_peripheral_std_uart = {
+struct platform_data_t tfm_peripheral_std_uart = {
UART0_BASE + NS_OFFSET,
UART0_BASE + NS_OFFSET + 0xFFF,
PPC_SP_DO_NOT_CONFIGURE,
-1
};
-struct tfm_spm_partition_platform_data_t tfm_peripheral_uart1 = {
+struct platform_data_t tfm_peripheral_uart1 = {
UART1_BASE,
UART1_BASE + 0xFFF,
PPC_SP_DO_NOT_CONFIGURE,
-1
};
-struct tfm_spm_partition_platform_data_t tfm_peripheral_timer0 = {
+struct platform_data_t tfm_peripheral_timer0 = {
TMR01_BASE,
TMR01_BASE + 0xFFF,
PPC_SP_DO_NOT_CONFIGURE,
diff --git a/platform/ext/target/nuvoton/m2351/target_cfg.h b/platform/ext/target/nuvoton/m2351/target_cfg.h
index 1f549c4..c876880 100644
--- a/platform/ext/target/nuvoton/m2351/target_cfg.h
+++ b/platform/ext/target/nuvoton/m2351/target_cfg.h
@@ -56,7 +56,7 @@
/**
* \brief Holds the data necessary to do isolation for a specific peripheral.
*/
-struct tfm_spm_partition_platform_data_t {
+struct platform_data_t {
uint32_t periph_start;
uint32_t periph_limit;
enum ppc_bank_e periph_ppc_bank;
diff --git a/platform/ext/target/nuvoton/m2351/tfm_peripherals_def.h b/platform/ext/target/nuvoton/m2351/tfm_peripherals_def.h
index 3167a67..1879f56 100644
--- a/platform/ext/target/nuvoton/m2351/tfm_peripherals_def.h
+++ b/platform/ext/target/nuvoton/m2351/tfm_peripherals_def.h
@@ -18,11 +18,11 @@
#define TFM_TIMER0_IRQ (TMR0_IRQn)
#define TFM_TIMER1_IRQ (TMR1_IRQn)
-struct tfm_spm_partition_platform_data_t;
+struct platform_data_t;
-extern struct tfm_spm_partition_platform_data_t tfm_peripheral_std_uart;
-extern struct tfm_spm_partition_platform_data_t tfm_peripheral_uart1;
-extern struct tfm_spm_partition_platform_data_t tfm_peripheral_timer0;
+extern struct platform_data_t tfm_peripheral_std_uart;
+extern struct platform_data_t tfm_peripheral_uart1;
+extern struct platform_data_t tfm_peripheral_timer0;
#define TFM_PERIPHERAL_STD_UART (&tfm_peripheral_std_uart)
#define TFM_PERIPHERAL_UART1 (&tfm_peripheral_uart1)
diff --git a/platform/ext/target/nxp/lpcxpresso55s69/spm_hal.c b/platform/ext/target/nxp/lpcxpresso55s69/spm_hal.c
index 80c9c16..3142599 100755
--- a/platform/ext/target/nxp/lpcxpresso55s69/spm_hal.c
+++ b/platform/ext/target/nxp/lpcxpresso55s69/spm_hal.c
@@ -30,7 +30,7 @@
enum tfm_plat_err_t tfm_spm_hal_configure_default_isolation(
uint32_t partition_idx,
- const struct tfm_spm_partition_platform_data_t *platform_data)
+ 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)
diff --git a/platform/ext/target/nxp/lpcxpresso55s69/target_cfg.c b/platform/ext/target/nxp/lpcxpresso55s69/target_cfg.c
index d7274d7..8f21e59 100755
--- a/platform/ext/target/nxp/lpcxpresso55s69/target_cfg.c
+++ b/platform/ext/target/nxp/lpcxpresso55s69/target_cfg.c
@@ -79,14 +79,14 @@
*/
#define SCB_AIRCR_WRITE_MASK ((0x5FAUL << SCB_AIRCR_VECTKEY_Pos))
-struct tfm_spm_partition_platform_data_t tfm_peripheral_std_uart = {
+struct platform_data_t tfm_peripheral_std_uart = {
USART0_BASE_NS,
USART0_BASE_NS + 0xFFF,
0,
0
};
-struct tfm_spm_partition_platform_data_t tfm_peripheral_timer0 = {
+struct platform_data_t tfm_peripheral_timer0 = {
CTIMER2_BASE,
CTIMER2_BASE + 0xFFF,
&(AHB_SECURE_CTRL->SEC_CTRL_APB_BRIDGE[0].SEC_CTRL_APB_BRIDGE1_MEM_CTRL1),
diff --git a/platform/ext/target/nxp/lpcxpresso55s69/target_cfg.h b/platform/ext/target/nxp/lpcxpresso55s69/target_cfg.h
index 9b85938..e7d3d9e 100755
--- a/platform/ext/target/nxp/lpcxpresso55s69/target_cfg.h
+++ b/platform/ext/target/nxp/lpcxpresso55s69/target_cfg.h
@@ -46,7 +46,7 @@
/**
* \brief Holds the data necessary to do isolation for a specific peripheral.
*/
-struct tfm_spm_partition_platform_data_t
+struct platform_data_t
{
uint32_t periph_start;
uint32_t periph_limit;
diff --git a/platform/ext/target/nxp/lpcxpresso55s69/tfm_peripherals_def.h b/platform/ext/target/nxp/lpcxpresso55s69/tfm_peripherals_def.h
index 54f45c0..4c4162a 100755
--- a/platform/ext/target/nxp/lpcxpresso55s69/tfm_peripherals_def.h
+++ b/platform/ext/target/nxp/lpcxpresso55s69/tfm_peripherals_def.h
@@ -23,10 +23,10 @@
#define CTIMER_NS_IRQ_HANDLER CTIMER3_IRQHandler
#define TFM_TIMER1_IRQ CTIMER3_IRQn /* use by tfm_core_test_irq() */
-struct tfm_spm_partition_platform_data_t;
+struct platform_data_t;
-extern struct tfm_spm_partition_platform_data_t tfm_peripheral_std_uart;
-extern struct tfm_spm_partition_platform_data_t tfm_peripheral_timer0;
+extern struct platform_data_t tfm_peripheral_std_uart;
+extern struct platform_data_t tfm_peripheral_timer0;
#define TFM_PERIPHERAL_STD_UART (&tfm_peripheral_std_uart)
#define TFM_PERIPHERAL_TIMER0 (&tfm_peripheral_timer0)
diff --git a/platform/ext/target/stm/common/stm32l5xx/boards/target_cfg.h b/platform/ext/target/stm/common/stm32l5xx/boards/target_cfg.h
index 5e982d3..34b584f 100644
--- a/platform/ext/target/stm/common/stm32l5xx/boards/target_cfg.h
+++ b/platform/ext/target/stm/common/stm32l5xx/boards/target_cfg.h
@@ -37,7 +37,7 @@
/**
* \brief Holds the data necessary to do isolation for a specific peripheral.
*/
-struct tfm_spm_partition_platform_data_t
+struct platform_data_t
{
uint32_t periph_start;
uint32_t periph_limit;
diff --git a/platform/ext/target/stm/common/stm32l5xx/boards/tfm_peripherals_def.h b/platform/ext/target/stm/common/stm32l5xx/boards/tfm_peripherals_def.h
index 6a6433c..28ffc08 100644
--- a/platform/ext/target/stm/common/stm32l5xx/boards/tfm_peripherals_def.h
+++ b/platform/ext/target/stm/common/stm32l5xx/boards/tfm_peripherals_def.h
@@ -8,7 +8,7 @@
#ifndef __TFM_PERIPHERALS_DEF_H__
#define __TFM_PERIPHERALS_DEF_H__
-struct tfm_spm_partition_platform_data_t;
+struct platform_data_t;
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 979d6ae..94cab01 100644
--- a/platform/ext/target/stm/common/stm32l5xx/secure/spm_hal.c
+++ b/platform/ext/target/stm/common/stm32l5xx/secure/spm_hal.c
@@ -20,7 +20,7 @@
enum tfm_plat_err_t tfm_spm_hal_configure_default_isolation(
uint32_t partition_idx,
- const struct tfm_spm_partition_platform_data_t *platform_data)
+ const struct platform_data_t *platform_data)
{
/* plat data are ignored */
return TFM_PLAT_ERR_SUCCESS;
diff --git a/platform/include/tfm_spm_hal.h b/platform/include/tfm_spm_hal.h
index 4bdeccc..bfe8426 100644
--- a/platform/include/tfm_spm_hal.h
+++ b/platform/include/tfm_spm_hal.h
@@ -29,7 +29,7 @@
* platform in the header file tfm_peripherals_def.h. For details on this, see
* the documentation of that file.
*/
-struct tfm_spm_partition_platform_data_t;
+struct platform_data_t;
enum irq_target_state_t {
TFM_IRQ_TARGET_STATE_SECURE,
@@ -84,7 +84,7 @@
*/
enum tfm_plat_err_t tfm_spm_hal_configure_default_isolation(
uint32_t partition_idx,
- const struct tfm_spm_partition_platform_data_t *platform_data);
+ const struct platform_data_t *platform_data);
/**
* \brief Configures the system debug properties.
* The default configuration of this function should disable secure debug
diff --git a/platform/readme.rst b/platform/readme.rst
index bbdd6c5..4919205 100644
--- a/platform/readme.rst
+++ b/platform/readme.rst
@@ -12,7 +12,7 @@
on the platform. The name of the peripheral used by a service is set in its
manifest file. The platform have to provide a macro for each of the provided
peripherals, that is substituted to a pointer to type
-``struct tfm_spm_partition_platform_data_t``. The memory that the pointer points
+``struct platform_data_t``. The memory that the pointer points
to is allocated by the platform code. The pointer gets stored in the partitions
database in SPM, and it is provided to the SPM HAL functions.
diff --git a/secure_fw/spm/cmsis_func/include/spm_func.h b/secure_fw/spm/cmsis_func/include/spm_func.h
index a70da00..1ffe943 100644
--- a/secure_fw/spm/cmsis_func/include/spm_func.h
+++ b/secure_fw/spm/cmsis_func/include/spm_func.h
@@ -119,7 +119,7 @@
struct spm_partition_runtime_data_t runtime_data;
const struct spm_partition_static_data_t *static_data;
/** A list of platform_data pointers */
- const struct tfm_spm_partition_platform_data_t **platform_data_list;
+ const struct platform_data_t **platform_data_list;
};
struct spm_partition_db_t {
diff --git a/secure_fw/spm/cmsis_func/spm_func.c b/secure_fw/spm/cmsis_func/spm_func.c
index c1bd5c2..72ec0ff 100644
--- a/secure_fw/spm/cmsis_func/spm_func.c
+++ b/secure_fw/spm/cmsis_func/spm_func.c
@@ -1222,7 +1222,7 @@
int32_t args[4] = {0};
int32_t fail_cnt = 0;
uint32_t idx;
- const struct tfm_spm_partition_platform_data_t **platform_data_p;
+ const struct platform_data_t **platform_data_p;
/* Call the init function for each partition */
for (idx = 0; idx < g_spm_partition_db.partition_count; ++idx) {
diff --git a/secure_fw/spm/cmsis_func/tfm_spm_db_func.inc.template b/secure_fw/spm/cmsis_func/tfm_spm_db_func.inc.template
index f60b9e4..9044249 100644
--- a/secure_fw/spm/cmsis_func/tfm_spm_db_func.inc.template
+++ b/secure_fw/spm/cmsis_func/tfm_spm_db_func.inc.template
@@ -179,7 +179,7 @@
{% if partition.attr.conditional %}
#ifdef {{partition.attr.conditional}}
{% endif %}
-const struct tfm_spm_partition_platform_data_t *
+const struct platform_data_t *
platform_data_list_{{partition.manifest.name}}[] =
{
{% for region in partition.manifest.mmio_regions %}
@@ -199,7 +199,7 @@
{% endif %}
{% endfor %}
-const struct tfm_spm_partition_platform_data_t **platform_data_list_list[] =
+const struct platform_data_t **platform_data_list_list[] =
{
NULL,
NULL,
diff --git a/secure_fw/spm/cmsis_psa/spm_ipc.c b/secure_fw/spm/cmsis_psa/spm_ipc.c
index 983d5d4..177268c 100644
--- a/secure_fw/spm/cmsis_psa/spm_ipc.c
+++ b/secure_fw/spm/cmsis_psa/spm_ipc.c
@@ -640,7 +640,7 @@
uint32_t i, j, num;
struct partition_t *partition;
struct tfm_core_thread_t *pth, *p_ns_entry_thread = NULL;
- const struct tfm_spm_partition_platform_data_t **platform_data_p;
+ const struct platform_data_t **platform_data_p;
tfm_pool_init(conn_handle_pool,
POOL_BUFFER_SIZE(conn_handle_pool),
@@ -666,7 +666,8 @@
continue;
}
- platform_data_p = partition->platform_data_list;
+ platform_data_p =
+ (const struct platform_data_t **)partition->p_static->platform_data;
if (platform_data_p != NULL) {
while ((*platform_data_p) != NULL) {
if (tfm_spm_hal_configure_default_isolation(i,
@@ -1016,8 +1017,6 @@
for (i = 0; i < g_spm_partition_db.partition_count; i++) {
g_spm_partition_db.partitions[i].p_static = &static_data_list[i];
- g_spm_partition_db.partitions[i].platform_data_list =
- platform_data_list_list[i];
g_spm_partition_db.partitions[i].memory_data = &memory_data_list[i];
}
g_spm_partition_db.is_init = 1;
diff --git a/secure_fw/spm/cmsis_psa/spm_ipc.h b/secure_fw/spm/cmsis_psa/spm_ipc.h
index 303c543..8d23c52 100644
--- a/secure_fw/spm/cmsis_psa/spm_ipc.h
+++ b/secure_fw/spm/cmsis_psa/spm_ipc.h
@@ -92,6 +92,7 @@
size_t stack_size; /* Stack size of the partition */
uintptr_t heap_base_addr; /* Heap base of the partition */
size_t heap_size; /* Heap size of the partition */
+ uintptr_t platform_data; /* Platform specific data */
uint32_t ndeps; /* Numbers of depended services */
uint32_t *deps; /* Pointer to dependency arrays */
};
@@ -112,7 +113,6 @@
uint32_t signals_waiting;
uint32_t signals_asserted;
/** A list of platform_data pointers */
- const struct tfm_spm_partition_platform_data_t **platform_data_list;
const struct tfm_spm_partition_memory_data_t *memory_data;
};
diff --git a/secure_fw/spm/cmsis_psa/tfm_spm_db_ipc.inc.template b/secure_fw/spm/cmsis_psa/tfm_spm_db_ipc.inc.template
index 4d36797..59c5168 100644
--- a/secure_fw/spm/cmsis_psa/tfm_spm_db_ipc.inc.template
+++ b/secure_fw/spm/cmsis_psa/tfm_spm_db_ipc.inc.template
@@ -95,6 +95,36 @@
{% endif %}
{% endfor %}
+
+/**************************************************************************/
+/** The platform data of the partition list */
+/**************************************************************************/
+{% for partition in partitions %}
+ {% if partition.manifest.mmio_regions %}
+ {% if partition.attr.conditional %}
+#ifdef {{partition.attr.conditional}}
+ {% endif %}
+const struct platform_data_t *
+ platform_data_list_{{partition.manifest.name}}[] =
+{
+ {% for region in partition.manifest.mmio_regions %}
+ {% if region.conditional %}
+#ifdef {{region.conditional}}
+ {% endif %}
+ {{region.name}},
+ {% if region.conditional %}
+#endif /* {{region.conditional}} */
+ {% endif %}
+ {% endfor %}
+ NULL
+};
+ {% if partition.attr.conditional %}
+#endif /* {{partition.attr.conditional}} */
+ {% endif %}
+
+ {% endif %}
+{% endfor %}
+
/**************************************************************************/
/** The static data of the partition list */
/**************************************************************************/
@@ -142,6 +172,11 @@
.entry = {{partition.manifest.entry_point}},
.stack_base_addr = 0,
.stack_size = 0,
+ {% if partition.manifest.mmio_regions %}
+ .platform_data = (uintptr_t)platform_data_list_{{partition.manifest.name}},
+ {% else %}{# if partition.manifest.mmio_regions #}
+ .platform_data = 0,
+ {% endif %}{# if partition.manifest.mmio_regions #}
.ndeps = {{partition.manifest.dependencies | length()}},
{% if partition.manifest.dependencies %}
.deps = dependencies_{{partition.manifest.name}},
@@ -157,54 +192,6 @@
};
/**************************************************************************/
-/** The platform data of the partition list */
-/**************************************************************************/
-{% for partition in partitions %}
- {% if partition.manifest.mmio_regions %}
- {% if partition.attr.conditional %}
-#ifdef {{partition.attr.conditional}}
- {% endif %}
-const struct tfm_spm_partition_platform_data_t *
- platform_data_list_{{partition.manifest.name}}[] =
-{
- {% for region in partition.manifest.mmio_regions %}
- {% if region.conditional %}
-#ifdef {{region.conditional}}
- {% endif %}
- {{region.name}},
- {% if region.conditional %}
-#endif /* {{region.conditional}} */
- {% endif %}
- {% endfor %}
- NULL
-};
- {% if partition.attr.conditional %}
-#endif /* {{partition.attr.conditional}} */
- {% endif %}
-
- {% endif %}
-{% endfor %}
-const struct tfm_spm_partition_platform_data_t **platform_data_list_list[] =
-{
- NULL,
-
-{% for partition in partitions %}
- {% if partition.attr.conditional %}
-#ifdef {{partition.attr.conditional}}
- {% endif %}
- {% if partition.manifest.mmio_regions %}
- platform_data_list_{{partition.manifest.name}},
- {% else %}{# if partition.manifest.mmio_regions #}
- NULL,
- {% endif %}{# if partition.manifest.mmio_regions #}
- {% if partition.attr.conditional %}
-#endif /* {{partition.attr.conditional}} */
- {% endif %}
-
-{% endfor %}
-};
-
-/**************************************************************************/
/** The memory data of the partition list */
/**************************************************************************/
const struct tfm_spm_partition_memory_data_t memory_data_list[] =