Skip to content

Commit 11bff3f

Browse files
Michael Schwarczurutva
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) (cherry picked from commit 185d286) (cherry picked from commit fb068d2)
1 parent b0fe59d commit 11bff3f

File tree

13 files changed

+12
-312
lines changed

13 files changed

+12
-312
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 & 72 deletions
This file was deleted.

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

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

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

Lines changed: 3 additions & 1 deletion
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-
#define TFM_MSG_QUEUE_MAX_MSG_NUM 16
10+
#ifndef TFM_MSG_QUEUE_MAX_MSG_NUM
11+
#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
@@ -11,11 +11,15 @@
1111
#include "tfm_list.h"
1212
#include "tfm_secure_api.h"
1313

14+
#ifndef TFM_SPM_MAX_ROT_SERV_NUM
1415
#define TFM_SPM_MAX_ROT_SERV_NUM 28
16+
#endif
1517
#define TFM_VERSION_POLICY_RELAXED 0
1618
#define TFM_VERSION_POLICY_STRICT 1
1719

20+
#ifndef TFM_CONN_HANDLE_MAX_NUM
1821
#define TFM_CONN_HANDLE_MAX_NUM 32
22+
#endif
1923

2024
/* RoT connection handle list */
2125
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 & 18 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
@@ -49,7 +49,7 @@ TFM_POOL_DECLARE(msg_db_pool, sizeof(struct tfm_msg_body_t),
4949
TFM_MSG_QUEUE_MAX_MSG_NUM);
5050

5151
static struct tfm_spm_service_db_t g_spm_service_db[] = {
52-
#include "secure_fw/services/tfm_service_list.inc"
52+
#include "tfm_service_list.inc"
5353
};
5454

5555
/********************** 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"
@@ -90,7 +89,6 @@ int32_t tfm_core_init(void)
9089

9190
__enable_irq();
9291

93-
stdio_init();
9492
LOG_MSG("Secure image initializing!");
9593

9694
#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"

0 commit comments

Comments
 (0)