Skip to content

Commit 185d286

Browse files
Michael SchwarczOren Cohen
authored andcommitted
TF-M patch: General modifications
- Remove un-needed files - Disable printf and uart - Modify include paths - Guard macros from mbed_lib with ifndef (cherry picked from commit 1f30b52) (cherry picked from commit 71cd34d)
1 parent 4e6ed2b commit 185d286

File tree

13 files changed

+11
-307
lines changed

13 files changed

+11
-307
lines changed

components/TARGET_PSA/TARGET_TFM/COMPONENT_SPE/bl2/include/boot_record.h

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

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 & 14 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
@@ -46,7 +46,7 @@ TFM_POOL_DECLARE(msg_db_pool, sizeof(struct tfm_msg_body_t),
4646
TFM_MSG_QUEUE_MAX_MSG_NUM);
4747

4848
static struct tfm_spm_service_db_t g_spm_service_db[] = {
49-
#include "secure_fw/services/tfm_service_list.inc"
49+
#include "tfm_service_list.inc"
5050
};
5151

5252
/********************** 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
@@ -122,7 +122,7 @@ enum spm_err_t tfm_spm_db_init(void)
122122
++g_spm_partition_db.partition_count;
123123

124124
/* Add user-defined secure partitions */
125-
#include "secure_fw/services/tfm_partition_list.inc"
125+
#include "tfm_partition_list.inc"
126126

127127
g_spm_partition_db.is_init = 1;
128128

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)