fix(sve): represent sve Z0-31 registers as array of bytes

Currently each Z register is type defined as sve_vector_t but the helper
routine to write or read Z registers works based on current vector
length.

If test case defines 'sve_vector_t zregs[32]' and reads all Z registers
using sve_read_vector_regs() then zregs[n] might not corresponds to Zn
register unless the vector length is set to max value.

This patch also renames sve_vector_length_get() to sve_rdvl_1()

Signed-off-by: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
Change-Id: I42955f8009bdd7f40d74c5a8d21d7c16ce6d761e
diff --git a/include/lib/extensions/sve.h b/include/lib/extensions/sve.h
index 60432a5..ed5678e 100644
--- a/include/lib/extensions/sve.h
+++ b/include/lib/extensions/sve.h
@@ -37,12 +37,14 @@
 
 #ifndef __ASSEMBLY__
 
-typedef uint8_t sve_vector_t[SVE_VECTOR_LEN_BYTES];
+typedef uint8_t sve_z_regs_t[SVE_NUM_VECTORS * SVE_VECTOR_LEN_BYTES]
+		__aligned(16);
 
 void sve_config_vq(uint8_t sve_vq);
 uint32_t sve_probe_vl(uint8_t sve_max_vq);
-void sve_fill_vector_regs(const sve_vector_t v[SVE_NUM_VECTORS]);
-void sve_read_vector_regs(sve_vector_t v[SVE_NUM_VECTORS]);
+
+void sve_z_regs_write(const sve_z_regs_t *z_regs);
+void sve_z_regs_read(sve_z_regs_t *z_regs);
 
 /* Assembly routines */
 bool sve_subtract_arrays_interleaved(int *dst_array, int *src_array1,
@@ -55,7 +57,7 @@
 #ifdef __aarch64__
 
 /* Returns the SVE implemented VL in bytes (constrained by ZCR_EL3.LEN) */
-static inline uint64_t sve_vector_length_get(void)
+static inline uint64_t sve_rdvl_1(void)
 {
 	uint64_t vl;
 
diff --git a/include/runtime_services/spm_common.h b/include/runtime_services/spm_common.h
index 48471bc..0c8ade1 100644
--- a/include/runtime_services/spm_common.h
+++ b/include/runtime_services/spm_common.h
@@ -99,18 +99,6 @@
 				 uint32_t arg);
 void dump_ffa_value(struct ffa_value ret);
 
-/*
- * Fills SIMD/SVE registers with the content of the container v.
- * Number of vectors is assumed to be SIMD/SVE_NUM_VECTORS.
- */
-void fill_sve_vector_regs(const sve_vector_t v[SVE_NUM_VECTORS]);
-
-/*
- * Reads contents of SIMD/SVE registers into the provided container v.
- * Number of vectors is assumed to be SIMD/SVE_NUM_VECTORS.
- */
-void read_sve_vector_regs(sve_vector_t v[SVE_NUM_VECTORS]);
-
 bool check_spmc_execution_level(void);
 
 unsigned int get_ffa_feature_test_target(const struct ffa_features_test **test_target);