diff options
author | Zeng Heng <zengheng4@huawei.com> | 2023-08-15 12:09:13 +0800 |
---|---|---|
committer | Will Deacon <will@kernel.org> | 2023-08-16 15:24:01 +0100 |
commit | 3fc3c0d1246cfe440d9c44f2134fde432b311ab3 (patch) | |
tree | b3fad0f49d4ec4ceebfefe0be762e83a7c36b194 | |
parent | 7eb4ee66739ea187d3855f6dbf2ab48a512b4ae0 (diff) |
kselftest/arm64: add AES feature check to hwcap test
Add the AES feature check in the set of hwcap tests.
Signed-off-by: Zeng Heng <zengheng4@huawei.com>
Reviewed-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20230815040915.3966955-3-zengheng4@huawei.com
Signed-off-by: Will Deacon <will@kernel.org>
-rw-r--r-- | tools/testing/selftests/arm64/abi/hwcap.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tools/testing/selftests/arm64/abi/hwcap.c b/tools/testing/selftests/arm64/abi/hwcap.c index 83d3b6dcc0d8..96c2611f1ac0 100644 --- a/tools/testing/selftests/arm64/abi/hwcap.c +++ b/tools/testing/selftests/arm64/abi/hwcap.c @@ -34,6 +34,12 @@ */ typedef void (*sig_fn)(void); +static void aes_sigill(void) +{ + /* AESE V0.16B, V0.16B */ + asm volatile(".inst 0x4e284800" : : : ); +} + static void atomics_sigill(void) { /* STADD W0, [SP] */ @@ -274,6 +280,13 @@ static const struct hwcap_data { bool sigbus_reliable; } hwcaps[] = { { + .name = "AES", + .at_hwcap = AT_HWCAP, + .hwcap_bit = HWCAP_AES, + .cpuinfo = "aes", + .sigill_fn = aes_sigill, + }, + { .name = "CRC32", .at_hwcap = AT_HWCAP, .hwcap_bit = HWCAP_CRC32, |