fix(sve): discover the SVE vector length
Currently the (SPM) test that the SVE vectors are preserved
assumes that the SVE vector length is whatever the hard
coded maximum vector length we have at build time is,
currently 512 bits. The tests fill a buffer that can
hold the full set of maximally sized vectors, load it
into the registers, do a call and then read the values
back into a separate buffer and compare with the original
buffer. If the VL is less than the maximum then this
comparison will fail since only the subset of the read
buffer used by the actual vector length will be filled.
Fix this by reading the SVE vector length at runtime and
using that when verifying the read data rather than the
hard coded maximum value.
Increase the SVE test buffers to the maximum permitted by
the architecture. Configure ZCR_EL2.LEN to the maximum
permitted value (to the limit of the implementation and
EL3 constraint).
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Olivier Deprez <olivier.deprez@arm.com>
Change-Id: I1d96327d3423f2f8a3d7289ae02ab06a4bf9fde3
4 files changed