SPM: Sort out secure_fw/include

Move 'tfm_core_get_boot_data' into SPRTL since it is an API
for SP usage.

Change-Id: Ieeb029a990305cade72583ee5defe531af0ef5a5
Signed-off-by: Summer Qin <summer.qin@arm.com>
diff --git a/secure_fw/partitions/lib/sprt/CMakeLists.inc b/secure_fw/partitions/lib/sprt/CMakeLists.inc
index 23b725a..3f2b798 100644
--- a/secure_fw/partitions/lib/sprt/CMakeLists.inc
+++ b/secure_fw/partitions/lib/sprt/CMakeLists.inc
@@ -28,6 +28,7 @@
     "${LIBSPRT_DIR}/tfm_libsprt_c_memcpy.c"
     "${LIBSPRT_DIR}/tfm_libsprt_c_memmove.c"
     "${LIBSPRT_DIR}/tfm_libsprt_c_memcmp.c"
+    "${LIBSPRT_DIR}/service_api.c"
     "${TFM_ROOT_DIR}/interface/src/log/tfm_log_raw.c")
 
 if (TFM_PSA_API)
@@ -44,3 +45,4 @@
 
 #Setting include directories
 embedded_include_directories(PATH ${TFM_ROOT_DIR}/interface/include ABSOLUTE)
+embedded_include_directories(PATH ${LIBSPRT_DIR}/include ABSOLUTE)
diff --git a/secure_fw/partitions/lib/sprt/include/service_api.h b/secure_fw/partitions/lib/sprt/include/service_api.h
new file mode 100644
index 0000000..57f3e3d
--- /dev/null
+++ b/secure_fw/partitions/lib/sprt/include/service_api.h
@@ -0,0 +1,25 @@
+/*
+ * Copyright (c) 2020, Arm Limited. All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ *
+ */
+#ifndef __SERVICE_API_H__
+#define __SERVICE_API_H__
+
+#include <stdint.h>
+#include "tfm_boot_status.h"
+
+/**
+ * \brief Retrieve secure partition related data from shared memory area, which
+ *        stores shared data between bootloader and runtime firmware.
+ *
+ * \param[in]  major_type  Major type.
+ * \param[out] boot_data   Pointer to boot data.
+ * \param[in]  len         The length of the boot data.
+ */
+int32_t tfm_core_get_boot_data(uint8_t major_type,
+                               struct tfm_boot_data *boot_data,
+                               uint32_t len);
+
+#endif /* __SERVICE_API_H__ */
diff --git a/secure_fw/partitions/lib/sprt/service_api.c b/secure_fw/partitions/lib/sprt/service_api.c
new file mode 100644
index 0000000..09d48fd
--- /dev/null
+++ b/secure_fw/partitions/lib/sprt/service_api.c
@@ -0,0 +1,21 @@
+/*
+ * Copyright (c) 2020, Arm Limited. All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ *
+ */
+
+#include "cmsis_compiler.h"
+#include "service_api.h"
+#include "tfm/tfm_core_svc.h"
+
+__attribute__((naked))
+int32_t tfm_core_get_boot_data(uint8_t major_type,
+                               struct tfm_boot_data *boot_status,
+                               uint32_t len)
+{
+    __ASM volatile(
+        "SVC    %0\n"
+        "BX     lr\n"
+        : : "I" (TFM_SVC_GET_BOOT_DATA));
+}