feat(spmc): support for el3 direct messaging

This patch makes changes required to support el3 direct messaging from
an el3 spmd logical partition. It adds the logical partition
identifiers that are a reserved range as defined in the patch. The patch
also changes the checks for valid direct requests and responses to be
accepted or targeted to the spmd logical partition. When a direct
request is received from an spmd logical partition, the target secure
partition is put in spmc scheduled mode with all interrupts masked. When
a direct response is targeted to an spmd logical partition, the spmc
switches back to el3.

Signed-off-by: Raghu Krishnamurthy <raghu.ncstate@gmail.com>
Change-Id: I11a6ac1021e3e8913afc0f64cbbe89742b73fe73
diff --git a/src/api.c b/src/api.c
index 97bce2e..7520a76 100644
--- a/src/api.c
+++ b/src/api.c
@@ -2764,8 +2764,8 @@
 	       next_state == VCPU_STATE_BLOCKED);
 	current->state = VCPU_STATE_BLOCKED;
 
-	plat_ffa_wind_call_chain_ffa_direct_req(current_locked,
-						receiver_vcpu_locked);
+	plat_ffa_wind_call_chain_ffa_direct_req(
+		current_locked, receiver_vcpu_locked, sender_vm_id);
 
 	/* Switch to receiver vCPU targeted to by direct msg request */
 	*next = receiver_vcpu;
@@ -2804,7 +2804,8 @@
 				       struct ffa_value to_ret,
 				       bool is_nwd_call_chain)
 {
-	if (!vm_id_is_current_world(receiver_vm_id)) {
+	if (plat_ffa_is_spmd_lp_id(receiver_vm_id) ||
+	    !vm_id_is_current_world(receiver_vm_id)) {
 		*next = api_switch_to_other_world(current_locked, to_ret,
 						  VCPU_STATE_WAITING);