Skip to content

Commit 1f30b52

Browse files
author
Michael Schwarcz
committed
TF-M patch: General modifications
- Remove un-needed files - Disable printf and uart - Modify include paths - Guard macros from mbed_lib with ifndef
1 parent 8e62826 commit 1f30b52

File tree

12 files changed

+11
-224
lines changed

12 files changed

+11
-224
lines changed

components/TARGET_PSA/TARGET_TFM/COMPONENT_SPE/secure_fw/core/CMakeLists.inc

Lines changed: 0 additions & 71 deletions
This file was deleted.

components/TARGET_PSA/TARGET_TFM/COMPONENT_SPE/secure_fw/core/ipc/CMakeLists.inc

Lines changed: 0 additions & 74 deletions
This file was deleted.

components/TARGET_PSA/TARGET_TFM/COMPONENT_SPE/secure_fw/core/ipc/include/tfm_message_queue.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@
77
#ifndef __TFM_MESSAGE_QUEUE_H__
88
#define __TFM_MESSAGE_QUEUE_H__
99

10+
#ifndef TFM_MSG_QUEUE_MAX_MSG_NUM
1011
#define TFM_MSG_QUEUE_MAX_MSG_NUM 128
12+
#endif
1113
#define TFM_MSG_MAGIC 0x15154343
1214
/* Message struct to collect parameter from client */
1315
struct tfm_msg_body_t {

components/TARGET_PSA/TARGET_TFM/COMPONENT_SPE/secure_fw/core/ipc/include/tfm_spm.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,15 @@
1010
#include <stdbool.h>
1111
#include "tfm_list.h"
1212

13+
#ifndef TFM_SPM_MAX_ROT_SERV_NUM
1314
#define TFM_SPM_MAX_ROT_SERV_NUM 28
15+
#endif
1416
#define TFM_VERSION_POLICY_RELAXED 0
1517
#define TFM_VERSION_POLICY_STRICT 1
1618

19+
#ifndef TFM_CONN_HANDLE_MAX_NUM
1720
#define TFM_CONN_HANDLE_MAX_NUM 32
21+
#endif
1822

1923
/* RoT connection handle list */
2024
struct tfm_conn_handle_t {

components/TARGET_PSA/TARGET_TFM/COMPONENT_SPE/secure_fw/core/ipc/include/tfm_spm_signal_defs.h

Lines changed: 0 additions & 12 deletions
This file was deleted.

components/TARGET_PSA/TARGET_TFM/COMPONENT_SPE/secure_fw/core/ipc/tfm_spm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ TFM_POOL_DECLARE(msg_db_pool, sizeof(struct tfm_msg_body_t),
4545
TFM_MSG_QUEUE_MAX_MSG_NUM);
4646

4747
static struct tfm_spm_service_db_t g_spm_service_db[] = {
48-
#include "secure_fw/services/tfm_service_list.inc"
48+
#include "tfm_service_list.inc"
4949
};
5050

5151
/********************** SPM functions for handler mode ***********************/

components/TARGET_PSA/TARGET_TFM/COMPONENT_SPE/secure_fw/core/secure_utilities.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@
2525
#define EXC_NUM_PENDSV (14)
2626
#define EXC_NUM_SYSTICK (15)
2727

28+
#define printf(...)
29+
2830
/* Disable NS exceptions by setting NS PRIMASK to 1 */
2931
#define TFM_NS_EXC_DISABLE() __TZ_set_PRIMASK_NS(1)
3032
/* Enable NS exceptions by setting NS PRIMASK to 0 */

components/TARGET_PSA/TARGET_TFM/COMPONENT_SPE/secure_fw/core/tfm_core.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
#include "tfm_internal.h"
1212
#include "tfm_api.h"
1313
#include "platform/include/tfm_spm_hal.h"
14-
#include "uart_stdout.h"
1514
#include "secure_utilities.h"
1615
#include "secure_fw/spm/spm_api.h"
1716
#include "secure_fw/include/tfm_spm_services_api.h"
@@ -88,7 +87,6 @@ int32_t tfm_core_init(void)
8887

8988
__enable_irq();
9089

91-
stdio_init();
9290
LOG_MSG("Secure image initializing!");
9391

9492
#ifdef TFM_CORE_DEBUG

components/TARGET_PSA/TARGET_TFM/COMPONENT_SPE/secure_fw/core/tfm_secure_api.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
#include "tfm_secure_api.h"
1313
#include "tfm_nspm.h"
1414
#include "secure_utilities.h"
15-
#include "uart_stdout.h"
1615
#include "secure_fw/spm/spm_api.h"
1716
#include "region_defs.h"
1817
#include "tfm_api.h"

components/TARGET_PSA/TARGET_TFM/COMPONENT_SPE/secure_fw/spm/CMakeLists.inc

Lines changed: 0 additions & 61 deletions
This file was deleted.

components/TARGET_PSA/TARGET_TFM/COMPONENT_SPE/secure_fw/spm/spm_api.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ enum spm_err_t tfm_spm_db_init(void)
123123
++g_spm_partition_db.partition_count;
124124

125125
/* Add user-defined secure partitions */
126-
#include "secure_fw/services/tfm_partition_list.inc"
126+
#include "tfm_partition_list.inc"
127127

128128
g_spm_partition_db.is_init = 1;
129129

components/TARGET_PSA/TARGET_TFM/COMPONENT_SPE/secure_fw/spm/spm_partition_defs.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
*/
3030
#define TFM_SP_CORE_ID (1)
3131

32-
#include "secure_fw/services/tfm_partition_defs.inc"
32+
#include "tfm_partition_defs.inc"
3333

3434
/* This limit is only used to define the size of the database reserved for
3535
* partitions. There's no requirement that it match the number of partitions

0 commit comments

Comments
 (0)