fix: replace platform get core pos usage

It is incorrect for secure partitions to use the platform_get_core_pos
macro. MPIDR_EL1 read from S-EL1 is the impdef virtual MPIDR value set
by the SPMC on behalf of SP. The MPIDR value does not hold physical CPU
affinity values, but the linear vCPU index for the currently running
vCPU. Add an SPM helper to retrieve the vCPU index information and
update call sites to use this helper.

Signed-off-by: Olivier Deprez <olivier.deprez@arm.com>
Change-Id: Ic9927acc5b64d25331cb61a83d9acbdc83173e2b
diff --git a/spm/cactus/cactus_tests/cactus_test_interrupts.c b/spm/cactus/cactus_tests/cactus_test_interrupts.c
index 4250445..2e0249c 100644
--- a/spm/cactus/cactus_tests/cactus_test_interrupts.c
+++ b/spm/cactus/cactus_tests/cactus_test_interrupts.c
@@ -86,8 +86,9 @@
 			/* Received FFA_INTERRUPT in blocked state. */
 			VERBOSE("Processing FFA_INTERRUPT while"
 				" blocked on direct response\n");
-			unsigned int my_core_pos =
-				platform_get_core_pos(read_mpidr_el1());
+
+			/* Get vCPU index for currently running vCPU. */
+			unsigned int my_core_pos = spm_get_my_core_pos();
 
 			ffa_ret = ffa_run(fwd_dest, my_core_pos);
 		} else {