feat(arm): add ep_info handoff args setter

Add support for project specific APIs and re-introduce API for setting
TF-A `entry_point_info` arguments following the Arm register convention.

Change-Id: Ic40ef6d34771fe54b152312779620f22bc106640
Signed-off-by: Harrison Mutai <harrison.mutai@arm.com>
diff --git a/include/arm/ep_info.h b/include/arm/ep_info.h
new file mode 100644
index 0000000..a76c6ae
--- /dev/null
+++ b/include/arm/ep_info.h
@@ -0,0 +1,49 @@
+/*
+ * Copyright The Transfer List Library Contributors
+ *
+ * SPDX-License-Identifier: MIT OR GPL-2.0-or-later
+ */
+
+#ifndef EP_INFO_H
+#define EP_INFO_H
+
+#include <stdint.h>
+
+struct param_header {
+	uint8_t type; /* type of the structure */
+	uint8_t version; /* version of this structure */
+	uint16_t size; /* size of this structure in bytes */
+	uint32_t attr; /* attributes: unused bits SBZ */
+};
+
+struct aapcs_params {
+#ifdef __aarch64__
+	uint64_t arg0;
+	uint64_t arg1;
+	uint64_t arg2;
+	uint64_t arg3;
+	uint64_t arg4;
+	uint64_t arg5;
+	uint64_t arg6;
+	uint64_t arg7;
+#else
+	uint32_t arg0;
+	uint32_t arg1;
+	uint32_t arg2;
+	uint32_t arg3;
+#endif
+};
+
+struct entry_point_info {
+	struct param_header h;
+	uintptr_t pc;
+	uint32_t spsr;
+#ifndef __aarch64__
+	uintptr_t lr_svc;
+#endif
+	struct aapcs_params args;
+};
+
+#define GET_SPSR_RW(mode) (((mode) >> 0x4U) & 0x1U)
+
+#endif
\ No newline at end of file
diff --git a/include/transfer_list.h b/include/transfer_list.h
index 1e4bd7b..0d9b5a3 100644
--- a/include/transfer_list.h
+++ b/include/transfer_list.h
@@ -9,6 +9,7 @@
 
 #include <assert.h>
 #include <stdbool.h>
+#include <stddef.h>
 #include <stdint.h>
 
 #define TRANSFER_LIST_SIGNATURE 0x4a0fb10b
@@ -163,5 +164,9 @@
 struct transfer_list_entry *transfer_list_find(struct transfer_list_header *tl,
 					       uint32_t tag_id);
 
+struct entry_point_info *
+transfer_list_set_handoff_args(struct transfer_list_header *tl,
+			       struct entry_point_info *ep_info);
+
 #endif /* __ASSEMBLER__ */
 #endif /* TRANSFER_LIST_H */