File tree Expand file tree Collapse file tree 1 file changed +39
-0
lines changed
tools/testing/selftests/arm64/abi Expand file tree Collapse file tree 1 file changed +39
-0
lines changed Original file line number Diff line number Diff line change @@ -87,6 +87,24 @@ static void rng_sigill(void)
87
87
asm volatile ("mrs x0, S3_3_C2_C4_0" : : : "x0" );
88
88
}
89
89
90
+ static void sha1_sigill (void )
91
+ {
92
+ /* SHA1H S0, S0 */
93
+ asm volatile (".inst 0x5e280800" : : : );
94
+ }
95
+
96
+ static void sha2_sigill (void )
97
+ {
98
+ /* SHA256H Q0, Q0, V0.4S */
99
+ asm volatile (".inst 0x5e004000" : : : );
100
+ }
101
+
102
+ static void sha512_sigill (void )
103
+ {
104
+ /* SHA512H Q0, Q0, V0.2D */
105
+ asm volatile (".inst 0xce608000" : : : );
106
+ }
107
+
90
108
static void sme_sigill (void )
91
109
{
92
110
/* RDSVL x0, #0 */
@@ -327,6 +345,27 @@ static const struct hwcap_data {
327
345
.hwcap_bit = HWCAP2_RPRFM ,
328
346
.cpuinfo = "rprfm" ,
329
347
},
348
+ {
349
+ .name = "SHA1" ,
350
+ .at_hwcap = AT_HWCAP ,
351
+ .hwcap_bit = HWCAP_SHA1 ,
352
+ .cpuinfo = "sha1" ,
353
+ .sigill_fn = sha1_sigill ,
354
+ },
355
+ {
356
+ .name = "SHA2" ,
357
+ .at_hwcap = AT_HWCAP ,
358
+ .hwcap_bit = HWCAP_SHA2 ,
359
+ .cpuinfo = "sha2" ,
360
+ .sigill_fn = sha2_sigill ,
361
+ },
362
+ {
363
+ .name = "SHA512" ,
364
+ .at_hwcap = AT_HWCAP ,
365
+ .hwcap_bit = HWCAP_SHA512 ,
366
+ .cpuinfo = "sha512" ,
367
+ .sigill_fn = sha512_sigill ,
368
+ },
330
369
{
331
370
.name = "SME" ,
332
371
.at_hwcap = AT_HWCAP2 ,
You can’t perform that action at this time.
0 commit comments