SPM: Get "ns_caller" information from caller info

The "ns_caller" was passed to PSA API bodies as an argument.

This patch:
- Moves the non-secure caller check related codes into
  "tfm_spm_validate_caller()".
- Removes the arg "ns_caller" of PSA APIs, and changes to
  acquire "ns_caller" from the caller info.

Two cases for acquiring the "ns_caller":
- In multi-core topology, PSA API requests are processed via
  mailbox, which triggers pendSV. If PSA API is called from pendSV,
  caller is NS.
- Otherwise, caller security state is obtained from running
  partition load info.

Change-Id: I29d0a522fc4f50a258c9d12102ecdb5c35f4a5e1
Signed-off-by: Mingyang Sun <mingyang.sun@arm.com>
diff --git a/secure_fw/spm/include/tfm_arch_v8m.h b/secure_fw/spm/include/tfm_arch_v8m.h
index 5fbc2b2..e615c3c 100644
--- a/secure_fw/spm/include/tfm_arch_v8m.h
+++ b/secure_fw/spm/include/tfm_arch_v8m.h
@@ -40,6 +40,11 @@
         EXC_RETURN_STACK_MAIN | EXC_RETURN_RES0 |               \
         EXC_RETURN_EXC_SECURE
 
+/* Exception numbers */
+#define EXC_NUM_THREAD_MODE                     (0)
+#define EXC_NUM_SVCALL                          (11)
+#define EXC_NUM_PENDSV                          (14)
+
 #if defined(__ARM_ARCH_8_1M_MAIN__) || defined(__ARM_ARCH_8M_MAIN__)
 struct tfm_arch_ctx_t {
     uint32_t    r4;