aboutsummaryrefslogtreecommitdiff
path: root/platform
diff options
context:
space:
mode:
authorKevin Peng <kevin.peng@arm.com>2021-05-08 13:42:56 +0800
committerKevin Peng <kevin.peng@arm.com>2021-05-20 04:03:39 +0200
commitfc7b7717aebe7c5d00ba581bb9968af23fd8279e (patch)
tree3098fcc59f2e3a611e458640458ba064d158bd61 /platform
parent211f5d6a6b1d766eaa1dc1deba32304e91665b5b (diff)
downloadtrusted-firmware-m-fc7b7717aebe7c5d00ba581bb9968af23fd8279e.tar.gz
SPM: Convert SVC number to uint8_t
SVC number encoded in SVC instruction is 8-bit long. Currently it relies on the short-enum compiler option to have a 8-bit long SVC number type. This patch converts the enum to uint8_t for SVC number and divids the SVC numbers to two parts for IPC model: - 0x0 ~ 0x7F for SVC calls only allowed from Thread Mode - 0x80 ~ 0xFF for SVC calls only allowed from interrupt handling Note: For library model, the SVC numbers have no restrictions. Since the requirements for SVC number assignment are different, this patch also split the SVC number header for IPC and Library models. Change-Id: I0fb4dd110be6bab05e1c4b9a8fc55e1b8bfbc0eb Signed-off-by: Kevin Peng <kevin.peng@arm.com>
Diffstat (limited to 'platform')
-rw-r--r--platform/ext/common/tfm_hal_sp_logdev_periph.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/platform/ext/common/tfm_hal_sp_logdev_periph.c b/platform/ext/common/tfm_hal_sp_logdev_periph.c
index 177fb8386..9929d53a2 100644
--- a/platform/ext/common/tfm_hal_sp_logdev_periph.c
+++ b/platform/ext/common/tfm_hal_sp_logdev_periph.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2020, Arm Limited. All rights reserved.
+ * Copyright (c) 2020-2021, Arm Limited. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*
@@ -7,7 +7,12 @@
#include "tfm_hal_sp_logdev.h"
#include "uart_stdout.h"
-#include "tfm/tfm_core_svc.h"
+#ifdef TFM_PSA_API
+#include "svc_num.h"
+#else
+#include "tfm_core_svc.h"
+#endif /* TFM_PSA_API */
+#include "tfm_hal_device_header.h"
__attribute__((naked))
static int tfm_output_unpriv_string(const unsigned char *str, size_t len)