Skip to content

Commit 1f5fbef

Browse files
Michael Schwarczadbridge
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)
1 parent 1417a63 commit 1f5fbef

File tree

13 files changed

+11
-308
lines changed

13 files changed

+11
-308
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
@@ -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 & 15 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
@@ -47,7 +47,7 @@ TFM_POOL_DECLARE(msg_db_pool, sizeof(struct tfm_msg_body_t),
4747
TFM_MSG_QUEUE_MAX_MSG_NUM);
4848

4949
static struct tfm_spm_service_db_t g_spm_service_db[] = {
50-
#include "secure_fw/services/tfm_service_list.inc"
50+
#include "tfm_service_list.inc"
5151
};
5252

5353
/********************** 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
@@ -60,7 +60,7 @@ static void tfm_spm_partition_err_handler(
6060
* defined inside tfm_partition_list.inc file.
6161
*/
6262
static inline enum spm_err_t add_user_defined_partitions(void) {
63-
#include "secure_fw/services/tfm_partition_list.inc"
63+
#include "tfm_partition_list.inc"
6464

6565
return SPM_ERR_OK;
6666
}

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)