fix(amd): update transfer list args for OP-TEE
Populate the boot arguments for handoff to OP-TEE, along with secure
endpoint information, from the transfer list only when
SPD is set to opteed.
Fix for MISRA Violation: MISRA-C:2012 R.14.4:
- The controlling expression of an if statement and the controlling
expression of an iteration-statement shall have essentially Boolean
type.
Change-Id: I645205da3cb8ef9eea7d2c8d9a4200b485274e8a
Signed-off-by: Akshay Belsare <akshay.belsare@amd.com>
diff --git a/plat/amd/common/plat_xfer_list.c b/plat/amd/common/plat_xfer_list.c
index 7af6726..19c882b 100644
--- a/plat/amd/common/plat_xfer_list.c
+++ b/plat/amd/common/plat_xfer_list.c
@@ -45,9 +45,18 @@
continue;
case SECURE:
*bl32 = *ep;
- if (!transfer_list_set_handoff_args(tl_hdr, ep)) {
+#if defined(SPD_opteed)
+ /*
+ * Populate the args expected by opteed,
+ * arg0 - dt address,
+ * arg1 - Xfer List Convention Version,
+ * arg3 - Xfer List address
+ * remaining args are set to 0.
+ */
+ if (transfer_list_set_handoff_args(tl_hdr, bl32) == NULL) {
ERROR("Invalid transfer list\n");
}
+#endif /* SPD_opteed */
continue;
default:
ERROR("Unrecognized Image Security State %lu\n",