SPM: Add Macros of checking Partition attributes
This patch adds two Macros for checking Partition attributes:
- IS_PARTITION_PSA_ROT
- IS_PARTITION_IPC_MODEL
Change-Id: If4e843d7b68fc343273ab51cdf8ea1bae4b92000
Signed-off-by: Kevin Peng <kevin.peng@arm.com>
diff --git a/secure_fw/spm/include/load/partition_defs.h b/secure_fw/spm/include/load/partition_defs.h
index 88ca9f8..78e2f18 100644
--- a/secure_fw/spm/include/load/partition_defs.h
+++ b/secure_fw/spm/include/load/partition_defs.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2021, Arm Limited. All rights reserved.
+ * Copyright (c) 2021-2022, Arm Limited. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*
@@ -46,6 +46,11 @@
#define PTR_TO_REFERENCE(x) (uintptr_t)(x)
#define REFERENCE_TO_PTR(x, t) (t)(x)
+#define IS_PARTITION_PSA_ROT(pldi) (!!((pldi)->flags \
+ & PARTITION_MODEL_PSA_ROT))
+#define IS_PARTITION_IPC_MODEL(pldi) (!!((pldi)->flags \
+ & PARTITION_MODEL_IPC))
+
/*
* Common partition structure type, the extendable data is right after it.
* Extendable data has different size for each partition, and must be 4-byte