aboutsummaryrefslogtreecommitdiff
path: root/interface/src
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 /interface/src
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 'interface/src')
-rw-r--r--interface/src/psa/psa_client.c3
-rw-r--r--interface/src/psa/psa_lifecycle.c5
-rw-r--r--interface/src/psa/psa_service.c3
3 files changed, 7 insertions, 4 deletions
diff --git a/interface/src/psa/psa_client.c b/interface/src/psa/psa_client.c
index 2d921825c2..00d95eeb2b 100644
--- a/interface/src/psa/psa_client.c
+++ b/interface/src/psa/psa_client.c
@@ -6,9 +6,10 @@
*/
#include <inttypes.h>
-#include "tfm/tfm_core_svc.h"
#include "psa/client.h"
+#include "svc_num.h"
#include "tfm_api.h"
+#include "tfm_hal_device_header.h"
#include "tfm_psa_call_param.h"
__attribute__((naked))
diff --git a/interface/src/psa/psa_lifecycle.c b/interface/src/psa/psa_lifecycle.c
index 313bfd56dd..cee7dfd4d4 100644
--- a/interface/src/psa/psa_lifecycle.c
+++ b/interface/src/psa/psa_lifecycle.c
@@ -1,12 +1,13 @@
/*
- * Copyright (c) 2020, Arm Limited. All rights reserved.
+ * Copyright (c) 2020-2021, Arm Limited. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*
*/
#include <inttypes.h>
#include "psa/lifecycle.h"
-#include "tfm/tfm_core_svc.h"
+#include "svc_num.h"
+#include "tfm_hal_device_header.h"
__attribute__((naked))
uint32_t psa_rot_lifecycle_state(void)
diff --git a/interface/src/psa/psa_service.c b/interface/src/psa/psa_service.c
index 7ae3bd1f1a..a8ecef426f 100644
--- a/interface/src/psa/psa_service.c
+++ b/interface/src/psa/psa_service.c
@@ -7,9 +7,10 @@
#include <inttypes.h>
#include <stdio.h>
-#include "tfm/tfm_core_svc.h"
#include "psa/client.h"
#include "psa/service.h"
+#include "svc_num.h"
+#include "tfm_hal_device_header.h"
__attribute__((naked))
psa_signal_t psa_wait(psa_signal_t signal_mask, uint32_t timeout)