Skip to content

Commit 3fc3c0d

Browse files
henryZewilldeacon
authored andcommitted
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 <[email protected]> Reviewed-by: Mark Brown <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Will Deacon <[email protected]>
1 parent 7eb4ee6 commit 3fc3c0d

File tree

1 file changed

+13
-0
lines changed
  • tools/testing/selftests/arm64/abi

1 file changed

+13
-0
lines changed

tools/testing/selftests/arm64/abi/hwcap.c

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,12 @@
3434
*/
3535
typedef void (*sig_fn)(void);
3636

37+
static void aes_sigill(void)
38+
{
39+
/* AESE V0.16B, V0.16B */
40+
asm volatile(".inst 0x4e284800" : : : );
41+
}
42+
3743
static void atomics_sigill(void)
3844
{
3945
/* STADD W0, [SP] */
@@ -273,6 +279,13 @@ static const struct hwcap_data {
273279
sig_fn sigbus_fn;
274280
bool sigbus_reliable;
275281
} hwcaps[] = {
282+
{
283+
.name = "AES",
284+
.at_hwcap = AT_HWCAP,
285+
.hwcap_bit = HWCAP_AES,
286+
.cpuinfo = "aes",
287+
.sigill_fn = aes_sigill,
288+
},
276289
{
277290
.name = "CRC32",
278291
.at_hwcap = AT_HWCAP,

0 commit comments

Comments
 (0)