CI: cross-compile: riscv: Add RV64 machine with Zb* and Zk*
authorChristoph Müllner <christoph.muellner@vrull.eu>
Sat, 21 Jan 2023 14:55:27 +0000 (15:55 +0100)
committerHugo Landau <hlandau@openssl.org>
Tue, 24 Jan 2023 11:01:20 +0000 (11:01 +0000)
RISC-V already has a couple of routines to accelerate cryptographic
calculations using ISA extensions. Let's add a cross-compile target
that allows the CI to test this code.

The new defined machine is a rv64gc machine with
* all Bitmanip extensions (Zb*)
* all Scalar Crypto extensions (Zk*)

This selection matches the supported RISC-V extensions in OpenSSL.

Signed-off-by: Christoph Müllner <christoph.muellner@vrull.eu>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Hugo Landau <hlandau@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/20107)

.github/workflows/cross-compiles.yml

index 124553c743ca3f6e5431b1981003c10c120595a2..6c226e9ec15dc3f332aacf84cbee681f964fa247 100644 (file)
@@ -94,9 +94,18 @@ jobs:
             # resolves it.
             target: -O2 linux-ppc64le
           }, {
+            # RV64GC
             arch: riscv64-linux-gnu,
             libs: libc6-dev-riscv64-cross,
             target: linux64-riscv64
+          }, {
+            # RV64GC with bitmanip and scalar crypto extensions
+            arch: riscv64-linux-gnu,
+            libs: libc6-dev-riscv64-cross,
+            target: linux64-riscv64,
+            qemucpu: "rv64,zba=true,zbb=true,zbc=true,zbs=true,zbkb=true,zbkc=true,zbkx=true,zknd=true,zkne=true,zknh=true,zksed=true,zksh=true,zkr=true",
+            opensslcapsname: riscvcap, # OPENSSL_riscvcap
+            opensslcaps: "rv64gc_zba_zbb_zbc_zbs_zbkb_zbkc_zbkx_zbknd_zkne_zknh_zksed_zksh_zkr"
           }, {
             arch: s390x-linux-gnu,
             libs: libc6-dev-s390x-cross,