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_notifications.c b/spm/cactus/cactus_tests/cactus_test_notifications.c
index d8b88ed..6d7b41b 100644
--- a/spm/cactus/cactus_tests/cactus_test_notifications.c
+++ b/spm/cactus/cactus_tests/cactus_test_notifications.c
@@ -9,6 +9,7 @@
 #include "sp_tests.h"
 
 #include <ffa_helpers.h>
+#include <spm_helpers.h>
 #include <debug.h>
 
 /* Booleans to keep track of which CPUs handled NPI. */
@@ -33,9 +34,8 @@
 
 void notification_pending_interrupt_handler(void)
 {
-	/* Get which core it is running from. */
-	unsigned int core_pos = platform_get_core_pos(
-						read_mpidr_el1() & MPID_MASK);
+	/* Get vCPU index for currently running vCPU. */
+	unsigned int core_pos = spm_get_my_core_pos();
 
 	VERBOSE("NPI handled in core %u\n", core_pos);