[SPM] checks if SIMD vectors are preserved
Populates the SIMD registers in the normal world, then modifies those in
the secure world. Upon return to the normal world checks that vectors
are restored to the original values.
Note: Does not check if SIMD vectors are preserved when returning back
to the secure world.
Signed-off-by: Olivier Deprez <olivier.deprez@arm.com>
Signed-off-by: Max Shvetsov <maksims.svecovs@arm.com>
Change-Id: I3ae223af64597f83afa6624122109db2cf0077f7
diff --git a/spm/cactus/cactus_test_cmds.h b/spm/cactus/cactus_test_cmds.h
index 0db523e..c662d27 100644
--- a/spm/cactus/cactus_test_cmds.h
+++ b/spm/cactus/cactus_test_cmds.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2020, Arm Limited. All rights reserved.
+ * Copyright (c) 2020-2021, Arm Limited. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
@@ -175,6 +175,21 @@
}
/**
+ * Request to fill SIMD vectors with dummy values with purpose to check a
+ * save/restore routine during the context switches between secure world and
+ * normal world.
+ *
+ * The command id is the hex representation of the string "SIMD"
+ */
+#define CACTUS_REQ_SIMD_FILL_CMD U(0x53494d44)
+
+static inline smc_ret_values cactus_req_simd_fill_send_cmd(
+ ffa_vm_id_t source, ffa_vm_id_t dest)
+{
+ return cactus_send_cmd(source, dest, CACTUS_REQ_SIMD_FILL_CMD, 0, 0, 0, 0);
+}
+
+/**
* Template for responses to CACTUS commands.
*/
static inline smc_ret_values cactus_response(