fix(ff-a): harden ffa_secondary_ep_register abi

Add more verbose comments with references to the specification for the
FFA_SECONDARY_EP_REGISTER ABI implementation.
Add FFA_FEATURES response to FFA_SECONDARY_EP_REGISTER ABI
for the SPMC case.
Add check whether ABI is called in context of Hypervisor or SPMC.
Reject the call in the former case.
Reject the FFA_SECONDARY_EP_REGISTER call for UP partitions.
Reject the FFA_SECONDARY_EP_REGISTER call after partition has
initialized.

Change-Id: I3ce723fc6cdde6f27709b664abfe2c7929e9d9b2
Signed-off-by: Olivier Deprez <olivier.deprez@arm.com>
diff --git a/src/arch/aarch64/hypervisor/handler.c b/src/arch/aarch64/hypervisor/handler.c
index 94a0c5b..5eac56d 100644
--- a/src/arch/aarch64/hypervisor/handler.c
+++ b/src/arch/aarch64/hypervisor/handler.c
@@ -650,6 +650,12 @@
 						     current, next);
 		return true;
 	case FFA_SECONDARY_EP_REGISTER_64:
+		/*
+		 * DEN0077A FF-A v1.1 Beta0 section 18.3.2.1.1
+		 * The callee must return NOT_SUPPORTED if this function is
+		 * invoked by a caller that implements version v1.0 of
+		 * the Framework.
+		 */
 		*args = api_ffa_secondary_ep_register(ipa_init(args->arg1),
 						      current);
 		return true;