Core: Add secure and trusted flags to partition DB

Add a new flags field to the secure partition DB. Add two flags,
signalling whether the partition is secure and/or trusted. When a
partition ID is checked whether its partition is secure or not, the new
flag is used, instead of comparing the partition ID to the partition ID
of the non-secure partition. This creates the possibility for the TF-M
to be able to handle multiple non-secure partitions.

Change-Id: I0a99eeb1b439892a709b934de6d66f9598781a8c
Signed-off-by: Mate Toth-Pal <mate.toth-pal@arm.com>
diff --git a/secure_fw/spm/spm_api.h b/secure_fw/spm/spm_api.h
index fced5d1..c36288f 100644
--- a/secure_fw/spm/spm_api.h
+++ b/secure_fw/spm/spm_api.h
@@ -31,6 +31,11 @@
     SPM_PARTITION_STATE_CLOSED
 };
 
+enum spm_part_flag_mask_t {
+    SPM_PART_FLAG_SECURE  = 0x01,
+    SPM_PART_FLAG_TRUSTED = 0x02,
+};
+
 /**
  * \brief Runtime context information of a partition
  */
@@ -113,6 +118,17 @@
 uint32_t tfm_spm_partition_get_partition_id(uint32_t partition_idx);
 
 /**
+ * \brief Get the flags associated with a partition
+ *
+ * \param[in] partition_idx     Partition index
+ *
+ * \return Flags associated with the partition
+ *
+ * \note This function doesn't check if partition_idx is valid.
+ */
+uint32_t tfm_spm_partition_get_flags(uint32_t partition_idx);
+
+/**
  * \brief Get the current runtime data of a partition
  *
  * \param[in] partition_idx     Partition index