]> git.baikalelectronics.ru Git - arm-tf.git/commit
feat(sme): fall back to SVE if SME is not there
authorMark Brown <broonie@kernel.org>
Mon, 9 May 2022 12:26:36 +0000 (13:26 +0100)
committerManish V Badarkhe <manish.badarkhe@arm.com>
Tue, 5 Jul 2022 09:37:18 +0000 (11:37 +0200)
commit26a3351edab1501d7e19ae96540c34b2700ac32f
treed665371b0218a4cfe40ec97230cb95ccf392707b
parent896fd4e2ff2c37f4a3d4d95e28b7195dbb846e1f
feat(sme): fall back to SVE if SME is not there

Due to their interrelationship in the architecture the SVE and SME
features in TF-A are mutually exclusive. This means that a single binary
can't be shared between systems with and without SME if the system
without SME does support SVE, SVE will not be initialised so lower ELs
will run into trouble trying to use it. This unusual behaviour for TF-A
which normally gracefully handles situations where features are enabled
but not supported on the current hardware.

Address this by calling the SVE enable and disable functions if SME is
not supported rather than immediately exiting, these perform their own
feature checks so if neither SVE nor SME is supported behaviour is
unchanged.

Signed-off-by: Mark Brown <broonie@kernel.org>
Change-Id: I2c606202fa6c040069f44e29d36b5abb48391874
lib/extensions/sme/sme.c