fix(wfxt): allow build without ARMv8.7 capable compiler
The WFIT and WFET instructions are part of the ARMv8.7 architecture
extension, and as such are unknown to older toolchains. The WFXT test is
forcing the assembler to use ARMv8.7 extensions when processing the
test_wfxt.c file, which requires a recent toolchain - which the binutils
shipping with Ubuntu 20.04 are not.
However we just need the assembler to pass those inline assembly
instructions on, and we don't need the toolchain to use any v8.7
features otherwise. And since we properly check the availability of
the WFxT feature before, it is safe to be hardcoded in the binary.
Fortunately the WFxT instructions use a system register encoding, so we
can use the generic sysreg naming scheme (Sx_*_C*_C*_*) to encode WFxT
without the toolchain needing to know about the new instructions.
Use the newly introduced macro to instantiate sysreg access functions
without a prefix to wrap the WFET and WFIT instructions. Then drop the
ARMv8.7 extension requirement from the .c file.
This allows TFTF to be compiled on an Ubuntu 20.04 system.
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Change-Id: If91cd88438c9dde5a4e2bb23f52a191a40be193b
2 files changed