diff --git a/.gdbinit b/.gdbinit new file mode 100644 index 0000000000000..739baa48b5928 --- /dev/null +++ b/.gdbinit @@ -0,0 +1,4 @@ +set sysroot /sysroot/focal-riscv64 + +handle SIGILL nostop noprint +handle SIGSEGV nostop noprint \ No newline at end of file diff --git a/.github/workflows/downstream.yml b/.github/workflows/downstream.yml new file mode 100644 index 0000000000000..3431a53fd35ec --- /dev/null +++ b/.github/workflows/downstream.yml @@ -0,0 +1,104 @@ +# +# Copyright (c) 2022, Rivos Inc. and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle in the LICENSE file that accompanied this code. +# +# This code is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +# version 2 for more details (a copy is included in the LICENSE file that +# accompanied this code). +# +# You should have received a copy of the GNU General Public License version +# 2 along with this work; if not, write to the Free Software Foundation, +# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. +# +# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +name: 'OpenJDK Downstreaming' + +on: + schedule: + # Trigger on Sunday to Friday at 21:00 UTC (23:00 CET, 14:00 PT) + # It triggers at least 9 hours before start of the working day in CET + # since that's when I would want to review it. And given GHA takes a long + # time to run, we want to start doing it as early as possible + - cron: '0 21 * * 0-4' + workflow_dispatch: + inputs: {} + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +permissions: + pull-requests: write + +jobs: + fetch-push-pr: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + token: ${{ secrets.WORKFLOW_TOKEN }} + ref: 'rivos/main' + fetch-depth: 0 + + - name: "Fetch" + id: fetch + run: | + git remote add upstream https://github.com/openjdk/jdk.git + git fetch --tags upstream master + + - name: "Configure" + id: configure + run: | + TAG=$(git tag | grep --extended-regexp '^jdk\-.*' | sort --version-sort | tail --lines 1 | tr --delete '\n') + test -n "$TAG" + + echo "tag=$TAG" >> $GITHUB_OUTPUT + echo "diff=$(test -n "$(git diff rivos/main...$TAG)" && echo "true" || echo "false")" >> $GITHUB_OUTPUT + + - name: "Push" + run: | + git push origin ${{ steps.configure.outputs.tag }} + + if [ "${{ steps.configure.outputs.diff }}" = "true" ]; then + git branch -f rivos/merge-${{ steps.configure.outputs.tag }} ${{ steps.configure.outputs.tag }} + + git checkout rivos/merge-${{ steps.configure.outputs.tag }} + # Setup user for merge commit + git config user.name "Ludovic Henry" + git config user.email "ludovic@rivosinc.com" + if ! git merge --no-ff --no-edit origin/rivos/main; then + # Print the conflicts + git diff + + # Abort the merge and let assignee manually resolve them + git merge --abort + fi + + git push origin rivos/merge-${{ steps.configure.outputs.tag }} + fi + + - name: "Create PR" + run: | + if [ "${{ steps.configure.outputs.diff }}" = "true" ]; then + gh pr create \ + --repo rivosinc/jdk \ + --base rivos/main \ + --head rivos/merge-${{ steps.configure.outputs.tag }} \ + --title "Merge ${{ steps.configure.outputs.tag }} into rivos/main" \ + --body "" \ + --assignee "luhenry" || true + fi + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index d5958853701ca..d6155a64f52fc 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -26,11 +26,12 @@ name: 'OpenJDK GHA Sanity Checks' on: + pull_request: + branches: + - rivos/main push: - branches-ignore: - - master - - pr/* - - jdk* + branches: + - rivos/main workflow_dispatch: inputs: platforms: @@ -89,7 +90,7 @@ jobs: function check_platform() { if [[ $GITHUB_EVENT_NAME == workflow_dispatch ]]; then input='${{ github.event.inputs.platforms }}' - elif [[ $GITHUB_EVENT_NAME == push ]]; then + elif [[ $GITHUB_EVENT_NAME == push || $GITHUB_EVENT_NAME == pull_request ]]; then if [[ '${{ !secrets.JDK_SUBMIT_FILTER || startsWith(github.ref, 'refs/heads/submit/') }}' == 'false' ]]; then # If JDK_SUBMIT_FILTER is set, and this is not a "submit/" branch, don't run anything >&2 echo 'JDK_SUBMIT_FILTER is set and not a "submit/" branch' diff --git a/CODEOWNERS b/CODEOWNERS new file mode 100644 index 0000000000000..f36d1b8fb7bb4 --- /dev/null +++ b/CODEOWNERS @@ -0,0 +1,2 @@ +# Default owners to managed runtimes team +* @rivosinc/managed-runtimes diff --git a/make.sh b/make.sh new file mode 100755 index 0000000000000..c7e678f4a271e --- /dev/null +++ b/make.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +DIST=${DIST:-focal} + +/sysroot/run-in.sh /sysroot/$DIST-amd64 make $* diff --git a/rivos/README.md b/rivos/README.md new file mode 100644 index 0000000000000..747520f865bc6 --- /dev/null +++ b/rivos/README.md @@ -0,0 +1,16 @@ +# Setup + +## QEMU + +You most likely want to setup QEMU user-space emulation at the OS level to transparently execute RISC-V binaries on an x86-64 host. + +To do so, first install `rivos-sdk-qemu`: +``` +sudo apt-get update +sudo apt-get install -y rivos-sdk-qemu +``` + +Then, setup binfmt_mist with: +``` +docker run --privileged --rm -v /rivos:/rivos -e QEMU_BINARY_PATH=/rivos/qemu/bin tonistiigi/binfmt --install riscv64 +``` diff --git a/rivos/configure-amd64.sh b/rivos/configure-amd64.sh new file mode 100755 index 0000000000000..60d471b3310e1 --- /dev/null +++ b/rivos/configure-amd64.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +DIST=${DIST:-focal} + +ARGS=( + --with-boot-jdk=/rivos/jdk + --with-zlib=system + --with-sysroot=/sysroot/$DIST-amd64 + --with-jmh=/workspace/jmh/build/images/jmh + --with-jtreg=/workspace/jtreg/build/images/jtreg + --with-hsdis=binutils --with-binutils-src=/workspace/binutils --enable-hsdis-bundling +) + +bash configure ${ARGS[@]} $* diff --git a/rivos/configure-riscv64.sh b/rivos/configure-riscv64.sh new file mode 100755 index 0000000000000..7a5ec73ae3c31 --- /dev/null +++ b/rivos/configure-riscv64.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +ARGS=( + --openjdk-target=riscv64-linux-gnu + --with-boot-jdk=/rivos/jdk + --with-build-jdk=/rivos/jdk + # --with-debug-level=slowdebug + --with-zlib=system + --with-sysroot=/rivos/sysroot/riscv + --with-jmh=/workspace/jmh/build/images/jmh + --with-jtreg=/workspace/jtreg/build/images/jtreg + --with-hsdis=binutils --with-binutils-src=/workspace/binutils --enable-hsdis-bundling +) + +bash configure ${ARGS[@]} $* diff --git a/rivos/gitlab-ci.yml b/rivos/gitlab-ci.yml new file mode 100644 index 0000000000000..38f20dbc71b9d --- /dev/null +++ b/rivos/gitlab-ci.yml @@ -0,0 +1,640 @@ + +include: + - project: 'rv/it/int/rivos-sdk' + ref: rivos/main + file: '/packager/gitlab-ci-packaging-helper.yml' + +variables: + CACHE_VERSION: "v6" + BUILD_JDK_VERSION: "23" + BINUTILS_VERSION: "2.38" + GTEST_TAG: "v1.14.0" + JTREG_VERSION: "7.3.1+1" + MARCH_AMD64: "x86-64-v3" + # MARCH_RISCV64: "rv64gcv_zvl256b_zba_zbb_zbs_zicond_zfa_ztso_zacas" # Zicond/Zfa/Ztso/Zacas not supported by GCC yet + MARCH_RISCV64: "rv64gcv_zvl256b_zba_zbb_zbs" + QEMU_CPU: rv64,v=true,vlen=256,elen=64,vext_spec=v1.0,zba=true,zbb=true,zbs=true + +prepare-version: + after_script: + - | + source make/conf/version-numbers.conf + if test -n "${CI_COMMIT_TAG}" && test "${CI_COMMIT_TAG}" =~ '^jdk\-\(.*\)-rivos$'; then + echo "JDK_VERSION_PKG=$(echo "${CI_COMMIT_TAG}" | sed 's/^jdk-\(.*\)-rivos$/\1/')" >> gitvars.env + echo "JDK_VERSION_TAG=${JDK_VERSION_PKG}" >> gitvars.env + echo "JDK_VERSION_PRE=ea" >> gitvars.env + echo "JDK_VERSION_OPT=" >> gitvars.env + else + echo "JDK_VERSION_PKG=${DEFAULT_VERSION_FEATURE}" >> gitvars.env + echo "JDK_VERSION_TAG=${CI_COMMIT_REF_SLUG}-${CI_COMMIT_SHORT_SHA}" >> gitvars.env + echo "JDK_VERSION_PRE=internal" >> gitvars.env + echo "JDK_VERSION_OPT=${CI_COMMIT_REF_SLUG}-${CI_COMMIT_SHORT_SHA}" >> gitvars.env + fi + # Debugging helper + - cat gitvars.env + +download-tools: + stage: prebuild + image: gitlab.ba.rivosinc.com:5050/rv/it/int/rivos-sdk:latest + script: + - > + apt-get update -qq && + apt-get install -qq -y + curl + zip + - | + curl -L https://builds.shipilev.net/jtreg/jtreg-${JTREG_VERSION}.zip > jtreg.zip + unzip jtreg.zip + rm -f jtreg.zip + artifacts: + when: on_success + paths: + - jtreg + +.build-linux: + stage: build + image: gitlab.ba.rivosinc.com:5050/rv/it/int/rivos-sdk:latest + variables: + CONF_NAME: linux-${PKG_ARCH}-${DEBUG_LEVEL} + script: + - > + apt-get update -qq && + apt-get install -qq -y + autoconf + build-essential + curl + file + g++ + gcc + git + $(test "${PKG_ARCH}" = "riscv64" && echo "g++-12-riscv64-linux-gnu" || true) + $(test "${PKG_ARCH}" = "riscv64" && echo "gcc-12-riscv64-linux-gnu" || true) + unzip + zip + zlib1g-dev + - | + mkdir -p /usr/lib/jvm/temurin-${BUILD_JDK_VERSION} + curl -L https://api.adoptium.net/v3/binary/latest/${BUILD_JDK_VERSION}/ea/linux/x64/jdk/hotspot/normal/eclipse\?project\=jdk \ + | tar -xzf - -C /usr/lib/jvm/temurin-${BUILD_JDK_VERSION} --strip-components 1 + - | + mkdir binutils + curl -L https://ftp.gnu.org/gnu/binutils/binutils-${BINUTILS_VERSION}.tar.gz \ + | tar -xzf - -C binutils --strip-components 1 + - git clone https://github.com/google/googletest.git -b ${GTEST_TAG} googletest + - > + bash configure + $(test "${PKG_ARCH}" = "riscv64" && echo "CC=riscv64-linux-gnu-gcc-12" || true) + $(test "${PKG_ARCH}" = "riscv64" && echo "CXX=riscv64-linux-gnu-g++-12" || true) + --with-debug-level=${DEBUG_LEVEL} + --openjdk-target=${PKG_ARCH}-linux-gnu + --with-conf-name=${CONF_NAME} + --with-vendor-name="Rivos Inc" + --with-version-pre="${JDK_VERSION_PRE}" + --with-version-opt="${JDK_VERSION_OPT}" + $(test "${PKG_ARCH}" = "riscv64" && echo "--with-sysroot=/rivos/sysroot/riscv" || true) + --with-boot-jdk=/usr/lib/jvm/temurin-${BUILD_JDK_VERSION} + --disable-precompiled-headers + --with-zlib=system + --with-gtest=$(pwd)/googletest + --with-jtreg=$(pwd)/jtreg + --with-hsdis=binutils + --with-binutils-src=binutils + --enable-hsdis-bundling + --with-extra-cflags="-march=${MARCH}" + --with-extra-cxxflags="-march=${MARCH}" + - make jdk-image test-image LOG_LEVEL=info + artifacts: + when: always + paths: + - config.log # in case of error during configure + - build/${CONF_NAME}/*.log + - build/${CONF_NAME}/Makefile + - build/${CONF_NAME}/make-support + - build/${CONF_NAME}/*.gmk + - build/${CONF_NAME}/images/jdk + - build/${CONF_NAME}/images/test + +.build-dependencies-amd64: + dependencies: + - prepare-version + - download-tools + +.build-dependencies-riscv64: + dependencies: + - prepare-version + - download-tools + +build-linux-amd64-fastdebug: + extends: .build-linux + dependencies: !reference [.build-dependencies-amd64, dependencies] + needs: !reference [.build-dependencies-amd64, dependencies] + variables: + PKG_ARCH: amd64 + DEBUG_LEVEL: fastdebug + MARCH: ${MARCH_AMD64} + +build-linux-riscv64-fastdebug: + extends: .build-linux + dependencies: !reference [.build-dependencies-riscv64, dependencies] + needs: !reference [.build-dependencies-riscv64, dependencies] + variables: + PKG_ARCH: riscv64 + DEBUG_LEVEL: fastdebug + MARCH: ${MARCH_RISCV64} + +build-linux-amd64-release: + extends: .build-linux + dependencies: !reference [.build-dependencies-amd64, dependencies] + needs: !reference [.build-dependencies-amd64, dependencies] + variables: + PKG_ARCH: amd64 + DEBUG_LEVEL: release + MARCH: ${MARCH_AMD64} + +build-linux-riscv64-release: + extends: .build-linux + dependencies: !reference [.build-dependencies-riscv64, dependencies] + needs: !reference [.build-dependencies-riscv64, dependencies] + variables: + PKG_ARCH: riscv64 + DEBUG_LEVEL: release + MARCH: ${MARCH_RISCV64} + +.run-gtests: + stage: test + image: gitlab.ba.rivosinc.com:5050/rv/it/int/rivos-sdk:latest + variables: + CONF: linux-${PKG_ARCH}-${DEBUG_LEVEL} + script: + - apt-get update + - | + apt-get install -y \ + build-essential \ + curl + - | + mkdir -p /usr/lib/jvm/temurin-${BUILD_JDK_VERSION} + curl -L https://api.adoptium.net/v3/binary/latest/${BUILD_JDK_VERSION}/ea/linux/x64/jdk/hotspot/normal/eclipse\?project\=jdk \ + | tar -xzf - -C /usr/lib/jvm/temurin-${BUILD_JDK_VERSION} --strip-components 1 + - if [[ "${PKG_ARCH}" = "riscv64" ]]; then export QEMU_LD_PREFIX=/rivos/sysroot/riscv; fi + - make test-prebuilt-with-exit-code \ + BOOT_JDK=/usr/lib/jvm/temurin-${BUILD_JDK_VERSION} \ + JDK_IMAGE_DIR=$(pwd)/build/${CONF}/images/jdk \ + TEST_IMAGE_DIR=$(pwd)/build/${CONF}/images/test \ + JT_HOME=$(pwd)/jtreg \ + TEST="gtest:all" + +# The gtest and jtreg job dependencies, so we don't duplicate them in each job. +# We add the amd64-release build to use as the -compiledjdk for all jtreg jobs +# (we could skip it from the gtest jobs if we wanted...). + +.test-dependencies-amd64-fastdebug: + dependencies: + - prepare-version + - download-tools + - build-linux-amd64-release + - build-linux-amd64-fastdebug + +.test-dependencies-riscv64-fastdebug: + dependencies: + - prepare-version + - download-tools + - build-linux-amd64-release + - build-linux-riscv64-fastdebug + +.test-dependencies-amd64-release: + dependencies: + - prepare-version + - download-tools + - build-linux-amd64-release + +.test-dependencies-riscv64-release: + dependencies: + - prepare-version + - download-tools + - build-linux-amd64-release + - build-linux-riscv64-release + +# gtest + +run-gtests-amd64-fastdebug: + extends: .run-gtests + dependencies: !reference [.test-dependencies-amd64-fastdebug, dependencies] + needs: !reference [.test-dependencies-amd64-fastdebug, dependencies] + variables: + PKG_ARCH: amd64 + DEBUG_LEVEL: fastdebug + +run-gtests-riscv64-fastdebug: + extends: .run-gtests + tags: ["22.04"] + dependencies: !reference [.test-dependencies-riscv64-fastdebug, dependencies] + needs: !reference [.test-dependencies-riscv64-fastdebug, dependencies] + variables: + PKG_ARCH: riscv64 + DEBUG_LEVEL: fastdebug + +run-gtests-amd64-release: + extends: .run-gtests + dependencies: !reference [.test-dependencies-amd64-release, dependencies] + needs: !reference [.test-dependencies-amd64-release, dependencies] + variables: + PKG_ARCH: amd64 + DEBUG_LEVEL: release + +run-gtests-riscv64-release: + extends: .run-gtests + tags: ["22.04"] + dependencies: !reference [.test-dependencies-riscv64-release, dependencies] + needs: !reference [.test-dependencies-riscv64-release, dependencies] + variables: + PKG_ARCH: riscv64 + DEBUG_LEVEL: release + +.run-jtreg-tests: + stage: test + image: gitlab.ba.rivosinc.com:5050/rv/it/int/rivos-sdk:latest + variables: + CONF: linux-${PKG_ARCH}-${DEBUG_LEVEL} + script: + - apt-get update + - | + apt-get install -y \ + build-essential \ + curl + - | + mkdir -p /usr/lib/jvm/temurin-${BUILD_JDK_VERSION} + curl -L https://api.adoptium.net/v3/binary/latest/${BUILD_JDK_VERSION}/ea/linux/x64/jdk/hotspot/normal/eclipse\?project\=jdk \ + | tar -xzf - -C /usr/lib/jvm/temurin-${BUILD_JDK_VERSION} --strip-components 1 + # Some of the variables and args (e.g., QEMU_LD_PREFIX, -compilejdk) are not really needed for amd64. + # However, we just added them to keep the script simpler. + - if [[ "${PKG_ARCH}" = "riscv64" ]]; then export QEMU_LD_PREFIX=/rivos/sysroot/riscv; fi + - make test-prebuilt-with-exit-code \ + BOOT_JDK=/usr/lib/jvm/temurin-${BUILD_JDK_VERSION} \ + JDK_IMAGE_DIR=$(pwd)/build/${CONF}/images/jdk \ + TEST_IMAGE_DIR=$(pwd)/build/${CONF}/images/test \ + JT_HOME=$(pwd)/jtreg \ + JTREG="OPTIONS=-compilejdk:$(pwd)/build/linux-amd64-release/images/jdk -e:QEMU_LD_PREFIX=${QEMU_LD_PREFIX}" + timeout: 2h + +# jtreg hotspot tier1 compiler + +run-jtreg-hotspot-tier1-compiler-tests-amd64-fastdebug: + extends: .run-jtreg-tests + dependencies: !reference [.test-dependencies-amd64-fastdebug, dependencies] + needs: !reference [.test-dependencies-amd64-fastdebug, dependencies] + variables: + PKG_ARCH: amd64 + DEBUG_LEVEL: fastdebug + TEST: tier1_compiler + allow_failure: true + +run-jtreg-hotspot-tier1-compiler-tests-riscv64-fastdebug: + extends: .run-jtreg-tests + tags: ["22.04"] + dependencies: !reference [.test-dependencies-riscv64-fastdebug, dependencies] + needs: !reference [.test-dependencies-riscv64-fastdebug, dependencies] + variables: + PKG_ARCH: riscv64 + DEBUG_LEVEL: fastdebug + TEST: tier1_compiler + allow_failure: true + +run-jtreg-hotspot-tier1-compiler-tests-amd64-release: + extends: .run-jtreg-tests + dependencies: !reference [.test-dependencies-amd64-release, dependencies] + needs: !reference [.test-dependencies-amd64-release, dependencies] + variables: + PKG_ARCH: amd64 + DEBUG_LEVEL: release + TEST: tier1_compiler + allow_failure: true + +run-jtreg-hotspot-tier1-compiler-tests-riscv64-release: + extends: .run-jtreg-tests + tags: ["22.04"] + dependencies: !reference [.test-dependencies-riscv64-release, dependencies] + needs: !reference [.test-dependencies-riscv64-release, dependencies] + variables: + PKG_ARCH: riscv64 + DEBUG_LEVEL: release + TEST: tier1_compiler + allow_failure: true + +# jtreg hotspot tier1 gc + +run-jtreg-hotspot-tier1-gc-tests-amd64-fastdebug: + extends: .run-jtreg-tests + dependencies: !reference [.test-dependencies-amd64-fastdebug, dependencies] + needs: !reference [.test-dependencies-amd64-fastdebug, dependencies] + variables: + PKG_ARCH: amd64 + DEBUG_LEVEL: fastdebug + TEST: tier1_gc + allow_failure: true + +run-jtreg-hotspot-tier1-gc-tests-riscv64-fastdebug: + extends: .run-jtreg-tests + tags: ["22.04"] + dependencies: !reference [.test-dependencies-riscv64-fastdebug, dependencies] + needs: !reference [.test-dependencies-riscv64-fastdebug, dependencies] + variables: + PKG_ARCH: riscv64 + DEBUG_LEVEL: fastdebug + TEST: tier1_gc + allow_failure: true + +run-jtreg-hotspot-tier1-gc-tests-amd64-release: + extends: .run-jtreg-tests + dependencies: !reference [.test-dependencies-amd64-release, dependencies] + needs: !reference [.test-dependencies-amd64-release, dependencies] + variables: + PKG_ARCH: amd64 + DEBUG_LEVEL: release + TEST: tier1_gc + allow_failure: true + +run-jtreg-hotspot-tier1-gc-tests-riscv64-release: + extends: .run-jtreg-tests + tags: ["22.04"] + dependencies: !reference [.test-dependencies-riscv64-release, dependencies] + needs: !reference [.test-dependencies-riscv64-release, dependencies] + variables: + PKG_ARCH: riscv64 + DEBUG_LEVEL: release + TEST: tier1_gc + allow_failure: true + +# jtreg hotspot tier1 runtime + +run-jtreg-hotspot-tier1-runtime-tests-amd64-fastdebug: + extends: .run-jtreg-tests + dependencies: !reference [.test-dependencies-amd64-fastdebug, dependencies] + needs: !reference [.test-dependencies-amd64-fastdebug, dependencies] + variables: + PKG_ARCH: amd64 + DEBUG_LEVEL: fastdebug + TEST: tier1_runtime + allow_failure: true + +run-jtreg-hotspot-tier1-runtime-tests-riscv64-fastdebug: + extends: .run-jtreg-tests + tags: ["22.04"] + dependencies: !reference [.test-dependencies-riscv64-fastdebug, dependencies] + needs: !reference [.test-dependencies-riscv64-fastdebug, dependencies] + variables: + PKG_ARCH: riscv64 + DEBUG_LEVEL: fastdebug + TEST: tier1_runtime + allow_failure: true + +run-jtreg-hotspot-tier1-runtime-tests-amd64-release: + extends: .run-jtreg-tests + dependencies: !reference [.test-dependencies-amd64-release, dependencies] + needs: !reference [.test-dependencies-amd64-release, dependencies] + variables: + PKG_ARCH: amd64 + DEBUG_LEVEL: release + TEST: tier1_runtime + allow_failure: true + +run-jtreg-hotspot-tier1-runtime-tests-riscv64-release: + extends: .run-jtreg-tests + tags: ["22.04"] + dependencies: !reference [.test-dependencies-riscv64-release, dependencies] + needs: !reference [.test-dependencies-riscv64-release, dependencies] + variables: + PKG_ARCH: riscv64 + DEBUG_LEVEL: release + TEST: tier1_runtime + allow_failure: true + +# jtreg hotspot tier1 common + +run-jtreg-hotspot-tier1-common-tests-amd64-fastdebug: + extends: .run-jtreg-tests + dependencies: !reference [.test-dependencies-amd64-fastdebug, dependencies] + needs: !reference [.test-dependencies-amd64-fastdebug, dependencies] + variables: + PKG_ARCH: amd64 + DEBUG_LEVEL: fastdebug + TEST: tier1_common + allow_failure: true + +run-jtreg-hotspot-tier1-common-tests-riscv64-fastdebug: + extends: .run-jtreg-tests + tags: ["22.04"] + dependencies: !reference [.test-dependencies-riscv64-fastdebug, dependencies] + needs: !reference [.test-dependencies-riscv64-fastdebug, dependencies] + variables: + PKG_ARCH: riscv64 + DEBUG_LEVEL: fastdebug + TEST: tier1_common + allow_failure: true + +run-jtreg-hotspot-tier1-common-tests-amd64-release: + extends: .run-jtreg-tests + dependencies: !reference [.test-dependencies-amd64-release, dependencies] + needs: !reference [.test-dependencies-amd64-release, dependencies] + variables: + PKG_ARCH: amd64 + DEBUG_LEVEL: release + TEST: tier1_common + allow_failure: true + +run-jtreg-hotspot-tier1-common-tests-riscv64-release: + extends: .run-jtreg-tests + tags: ["22.04"] + dependencies: !reference [.test-dependencies-riscv64-release, dependencies] + needs: !reference [.test-dependencies-riscv64-release, dependencies] + variables: + PKG_ARCH: riscv64 + DEBUG_LEVEL: release + TEST: tier1_common + allow_failure: true + +# jtreg hotspot tier1 serviceability + +run-jtreg-hotspot-tier1-serviceability-tests-amd64-fastdebug: + extends: .run-jtreg-tests + dependencies: !reference [.test-dependencies-amd64-fastdebug, dependencies] + needs: !reference [.test-dependencies-amd64-fastdebug, dependencies] + variables: + PKG_ARCH: amd64 + DEBUG_LEVEL: fastdebug + TEST: tier1_serviceability + allow_failure: true + +run-jtreg-hotspot-tier1-serviceability-tests-riscv64-fastdebug: + extends: .run-jtreg-tests + tags: ["22.04"] + dependencies: !reference [.test-dependencies-riscv64-fastdebug, dependencies] + needs: !reference [.test-dependencies-riscv64-fastdebug, dependencies] + variables: + PKG_ARCH: riscv64 + DEBUG_LEVEL: fastdebug + TEST: tier1_serviceability + allow_failure: true + +run-jtreg-hotspot-tier1-serviceability-tests-amd64-release: + extends: .run-jtreg-tests + dependencies: !reference [.test-dependencies-amd64-release, dependencies] + needs: !reference [.test-dependencies-amd64-release, dependencies] + variables: + PKG_ARCH: amd64 + DEBUG_LEVEL: release + TEST: tier1_serviceability + allow_failure: true + +run-jtreg-hotspot-tier1-serviceability-tests-riscv64-release: + extends: .run-jtreg-tests + tags: ["22.04"] + dependencies: !reference [.test-dependencies-riscv64-release, dependencies] + needs: !reference [.test-dependencies-riscv64-release, dependencies] + variables: + PKG_ARCH: riscv64 + DEBUG_LEVEL: release + TEST: tier1_serviceability + allow_failure: true + +package-tar: + stage: deploy + image: gitlab.ba.rivosinc.com:5050/rv/it/int/rivos-sdk:latest + dependencies: + - prepare-version + - build-linux-amd64-release + - build-linux-riscv64-release + needs: + - prepare-version + - build-linux-amd64-release + - build-linux-riscv64-release + script: + - apt-get update + - apt-get install -y curl + - tar -czf jdk-${JDK_VERSION_TAG}-linux-amd64.tar.gz -C build/linux-amd64-release/images jdk + - 'curl -i --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file jdk-${JDK_VERSION_TAG}-linux-amd64.tar.gz "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/jdk/${JDK_VERSION_TAG}/jdk-${JDK_VERSION_TAG}-linux-amd64.tar.gz"' + - tar -czf jdk-${JDK_VERSION_TAG}-linux-riscv64.tar.gz -C build/linux-riscv64-release/images jdk + - 'curl -i --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file jdk-${JDK_VERSION_TAG}-linux-riscv64.tar.gz "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/jdk/${JDK_VERSION_TAG}/jdk-${JDK_VERSION_TAG}-linux-riscv64.tar.gz"' + +.package-deb: + extends: .deploy-deb + variables: + PKG_LICENSE: "GPL-2.0 license" + PKG_UPSTREAM_VERSION: "${JDK_VERSION_PKG}" + PKG_DIRECTORIES: "${PKG_DIRECTORY}" + BUILD_ARCH: "$PKG_ARCH" + before_script: + # PKG_DIRECTORIES must be set + - test -n "${PKG_DIRECTORIES}" || exit 1 + # PKG_ARCH must be set + - test -n "${PKG_ARCH}" || exit 1 + # clean up pre-built binaries from the rivos-sdk + - rm -rf "${PKG_DIRECTORY}" + - mkdir -p "${PKG_DIRECTORY}" + # move the previous temporary install + - | + cp -av build/linux-${BUILD_ARCH}-release/images/jdk/* "${PKG_DIRECTORY}" + - | + if [ "${PKG_DBG}" = "true" ]; then + find "${PKG_DIRECTORY}" \( -xtype f -or -xtype l \) -not -name '*.debuginfo' -exec rm -f {} \; -print + find "${PKG_DIRECTORY}" -type d -print | sort -r | xargs -I{} bash -c "rmdir {} || true" + else + # remove *.debuginfo files, they take a lot of space + find "${PKG_DIRECTORY}" -type f -name '*.debuginfo' -exec rm -f {} \; -print + fi + +package-deb-amd64: + extends: .package-deb + dependencies: + - prepare-version + - build-linux-amd64-release + needs: + - prepare-version + - build-linux-amd64-release + variables: + PKG_DIRECTORY: "/rivos/jdk" + PKG_ARCH: "amd64" + +package-deb-riscv64: + extends: .package-deb + dependencies: + - prepare-version + - build-linux-riscv64-release + needs: + - prepare-version + - build-linux-riscv64-release + variables: + PKG_DIRECTORY: "/rivos/jdk" + PKG_ARCH: "riscv64" + +package-deb-cross-riscv64: + extends: .package-deb + dependencies: + - prepare-version + - build-linux-riscv64-release + needs: + - prepare-version + - build-linux-riscv64-release + variables: + PKG_NAME: "${PROJECT_NAME}-cross-riscv64" + PKG_DIRECTORY: "/rivos/sysroot/riscv/rivos/jdk" + PKG_ARCH: "amd64" + BUILD_ARCH: "riscv64" + +package-deb-dbg-amd64: + extends: .package-deb + dependencies: + - prepare-version + - build-linux-amd64-release + needs: + - prepare-version + - build-linux-amd64-release + variables: + PKG_NAME: "${PROJECT_NAME}-dbg" + PKG_DIRECTORY: "/rivos/jdk" + PKG_ARCH: "amd64" + PKG_DBG: "true" + +package-deb-dbg-riscv64: + extends: .package-deb + dependencies: + - prepare-version + - build-linux-riscv64-release + needs: + - prepare-version + - build-linux-riscv64-release + variables: + PKG_NAME: "${PROJECT_NAME}-dbg" + PKG_DIRECTORY: "/rivos/jdk" + PKG_ARCH: "riscv64" + PKG_DBG: "true" + +package-deb-dbg-cross-riscv64: + extends: .package-deb + dependencies: + - prepare-version + - build-linux-riscv64-release + needs: + - prepare-version + - build-linux-riscv64-release + variables: + PKG_NAME: "${PROJECT_NAME}-cross-riscv64-dbg" + PKG_DIRECTORY: "/rivos/sysroot/riscv/rivos/jdk" + PKG_ARCH: "amd64" + BUILD_ARCH: "riscv64" + PKG_DBG: "true" + +# deploy-module-ubuntu: +# extends: .deploy-module +# dependencies: +# - prepare-version +# - build-linux-amd64 +# needs: +# - prepare-version +# - build-linux-amd64 +# variables: +# CONTENT_PATH: "build/linux-amd64/images/jdk" +# UBUNTU2204_INSTALL_PATH: "${SDK_MODULES_ROOT}/ubuntu.22.04/x86_64/${CI_PROJECT_NAME}/${VERSION_TAG}" + +# Rebuild the rivos-sdk where we are exporting the artifacts built here. +update-sdk: + extends: .update-sdk diff --git a/run-tests.sh b/run-tests.sh new file mode 100644 index 0000000000000..84a6b82594021 --- /dev/null +++ b/run-tests.sh @@ -0,0 +1,47 @@ +#!/bin/bash + +# ex: QEMU_LD_PREFIX=/rivos/sysroot/riscv QEMU_CPU=rivos-sentinel-ga0 CONF=linux-riscv64-server-release bash run-tests.sh test/hotspot/jtreg:tier1 + +CONF=${CONF:-linux-riscv64-server-release} + +TESTSUITE=test/hotspot/jtreg +NATIVEPATH=$(pwd)/build/${CONF}/images/test/hotspot/jtreg/native + +TMPDIR=${TMPDIR:-$(pwd)/build/run-test/tmp} +mkdir -p ${TMPDIR} + +ARGS=( + # JVM arguments + -Xms64M + -Xmx1600M + -Duser.language=en + -Duser.country=US + -Djava.library.path="$(pwd)/build/${CONF}/images/test/failure_handler" + -Dprogram=jtreg + -jar /opt/jtreg/lib/jtreg.jar # download from https://builds.shipilev.net/jtreg/ + # JTreg arguments + -agentvm + -verbose:summary + -retain:fail,error + -concurrency:$(nproc) + -timeoutFactor:16 + -vmoption:-XX:MaxRAMPercentage=12.5 + -vmoption:-Djava.io.tmpdir="${TMPDIR}" + -automatic + -ignore:quiet + -e:JIB_DATA_DIR + -e:TEST_IMAGE_DIR=$(pwd)/build/${CONF}/images/test + -dir:$(pwd) + -reportDir:$(pwd)/build/run-test/test-results + -workDir:$(pwd)/build/run-test/test-support + -compilejdk:/rivos/jdk + -testjdk:$(pwd)/build/${CONF}/images/jdk + -e:QEMU_LD_PREFIX -e:QEMU_CPU + -javaoption:-XX:+UnlockExperimentalVMOptions + # -javaoption:-XX:+UseZacas or any other JVM option for the testjdk + $(test -n "${NATIVEPATH}" && echo "-nativepath:${NATIVEPATH}"|| true) + -exclude:${TESTSUITE}/ProblemList.txt + -exclude:${TESTSUITE}/ProblemList-GHA.txt +) + +/rivos/jdk/bin/java ${ARGS[@]} ${*:-${TESTSUITE}} diff --git a/src/hotspot/cpu/riscv/assembler_riscv.hpp b/src/hotspot/cpu/riscv/assembler_riscv.hpp index ad3d18fa39268..5b9235f1e18e5 100644 --- a/src/hotspot/cpu/riscv/assembler_riscv.hpp +++ b/src/hotspot/cpu/riscv/assembler_riscv.hpp @@ -1392,6 +1392,12 @@ enum VectorMask { INSN(vnmsac_vx, 0b1010111, 0b110, 0b101111); INSN(vmacc_vx, 0b1010111, 0b110, 0b101101); + // Vector Slide Instructions + INSN(vslideup_vx, 0b1010111, 0b100, 0b001110); + INSN(vslide1up_vx, 0b1010111, 0b110, 0b001110); + INSN(vslidedown_vx, 0b1010111, 0b100, 0b001111); + INSN(vslide1down_vx, 0b1010111, 0b110, 0b001111); + #undef INSN #define INSN(NAME, op, funct3, funct6) \ @@ -1508,6 +1514,7 @@ enum VectorMask { // Vector Register Gather Instructions INSN(vrgather_vv, 0b1010111, 0b000, 0b001100); + INSN(vrgatherei16_vv, 0b1010111, 0b000, 0b001110); #undef INSN diff --git a/src/hotspot/share/code/vtableStubs.cpp b/src/hotspot/share/code/vtableStubs.cpp index dbae8b8694f5e..8f63c8361d11b 100644 --- a/src/hotspot/share/code/vtableStubs.cpp +++ b/src/hotspot/share/code/vtableStubs.cpp @@ -239,7 +239,10 @@ address VtableStubs::find_stub(bool is_vtable_stub, int vtable_index) { // all locks. Only post this event if a new state is not required. Creating a new state would // cause a safepoint and the caller of this code has a NoSafepointVerifier. if (JvmtiExport::should_post_dynamic_code_generated()) { - JvmtiExport::post_dynamic_code_generated_while_holding_locks(is_vtable_stub? "vtable stub": "itable stub", + char buffer[32]; + jio_snprintf(buffer, sizeof(buffer), "%s stub #%d", + is_vtable_stub ? "vtable" : "itable", vtable_index); + JvmtiExport::post_dynamic_code_generated_while_holding_locks(buffer, s->code_begin(), s->code_end()); } } diff --git a/src/hotspot/share/logging/logAsyncWriter.hpp b/src/hotspot/share/logging/logAsyncWriter.hpp index 97bae2a581745..e0a1429450c16 100644 --- a/src/hotspot/share/logging/logAsyncWriter.hpp +++ b/src/hotspot/share/logging/logAsyncWriter.hpp @@ -176,7 +176,7 @@ class AsyncLogWriter : public NonJavaThread { void run() override; void pre_run() override { NonJavaThread::pre_run(); - log_debug(logging, thread)("starting AsyncLog Thread tid = " INTX_FORMAT, os::current_thread_id()); + log_debug(logging, thread)("starting %s tid = " INTX_FORMAT, name(), os::current_thread_id()); } const char* type_name() const override { return "AsyncLogWriter"; } void print_on(outputStream* st) const override { diff --git a/src/hotspot/share/runtime/globals.hpp b/src/hotspot/share/runtime/globals.hpp index b568e76930476..830e6725548aa 100644 --- a/src/hotspot/share/runtime/globals.hpp +++ b/src/hotspot/share/runtime/globals.hpp @@ -674,7 +674,7 @@ const int ObjectAlignmentInBytes = 8; "Tell whether the VM should register soft/weak/final/phantom " \ "references") \ \ - develop(bool, PrintCodeCacheExtension, false, \ + product(bool, PrintCodeCacheExtension, false, \ "Print extension of code cache") \ \ develop(bool, UsePrivilegedStack, true, \ diff --git a/src/hotspot/share/runtime/javaThread.cpp b/src/hotspot/share/runtime/javaThread.cpp index 14528f6d908fc..ea0c8e13e018a 100644 --- a/src/hotspot/share/runtime/javaThread.cpp +++ b/src/hotspot/share/runtime/javaThread.cpp @@ -697,6 +697,11 @@ JavaThread::~JavaThread() { // First JavaThread specific code executed by a new Java thread. void JavaThread::pre_run() { + { + ResourceMark rm; + log_debug(logging, thread)("Starting %s thread, tid = " INTX_FORMAT, name(), os::current_thread_id()); + } + // empty - see comments in run() } diff --git a/src/hotspot/share/runtime/nonJavaThread.cpp b/src/hotspot/share/runtime/nonJavaThread.cpp index f537afcaa0634..768b66cd43fb9 100644 --- a/src/hotspot/share/runtime/nonJavaThread.cpp +++ b/src/hotspot/share/runtime/nonJavaThread.cpp @@ -26,6 +26,7 @@ #include "gc/shared/barrierSet.hpp" #include "gc/shared/gcId.hpp" #include "jvm_io.h" +#include "logging/log.hpp" #include "runtime/atomic.hpp" #include "runtime/javaThread.hpp" #include "runtime/jniHandles.hpp" @@ -37,6 +38,8 @@ #include "utilities/defaultStream.hpp" #include "utilities/singleWriterSynchronizer.hpp" #include "utilities/vmError.hpp" +#include "memory/resourceArea.hpp" + #if INCLUDE_JFR #include "jfr/jfr.hpp" #endif @@ -103,6 +106,11 @@ void NonJavaThread::remove_from_the_list() { } void NonJavaThread::pre_run() { + { + ResourceMark rm; + log_debug(logging, thread)("Starting %s thread, tid = " INTX_FORMAT, name(), os::current_thread_id()); + } + add_to_the_list(); // This is slightly odd in that NamedThread is a subclass, but diff --git a/test/hotspot/gtest/code/test_codestrings.cpp b/test/hotspot/gtest/code/test_codestrings.cpp index fcd14b3b9b2a5..c04c71a8279d9 100644 --- a/test/hotspot/gtest/code/test_codestrings.cpp +++ b/test/hotspot/gtest/code/test_codestrings.cpp @@ -263,7 +263,7 @@ static void buffer_blob_test() BufferBlob::free(blob); } -#if defined(PPC) || defined(S390) +#if defined(PPC) || defined(S390) || defined(RISCV64) // Neither ppc nor s390 compiler use code strings TEST_VM(codestrings, DISABLED_validate) #else diff --git a/test/hotspot/jtreg/ProblemList-GHA.txt b/test/hotspot/jtreg/ProblemList-GHA.txt new file mode 100644 index 0000000000000..4192f48a1284f --- /dev/null +++ b/test/hotspot/jtreg/ProblemList-GHA.txt @@ -0,0 +1,69 @@ +# +# Copyright (c) 2022, Rivos Inc. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. +# +# This code is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +# version 2 for more details (a copy is included in the LICENSE file that +# accompanied this code). +# +# You should have received a copy of the GNU General Public License version +# 2 along with this work; if not, write to the Free Software Foundation, +# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. +# +# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +# :tier1_common + +gtest/GTestWrapper.java 0 linux-riscv64 +gtest/LargePageGtests.java#use-large-pages 0 linux-riscv64 +gtest/LargePageGtests.java#use-large-pages-1G 0 linux-riscv64 +gtest/LargePageGtests.java#use-large-pages-sysV 0 linux-riscv64 +gtest/NMTGtests.java#nmt-detail 0 linux-riscv64 +gtest/NMTGtests.java#nmt-off 0 linux-riscv64 +gtest/NMTGtests.java#nmt-summary 0 linux-riscv64 + + +# tier1_compiler_1 + +compiler/c2/irTests/TestAutoVectorization2DArray.java 0 linux-riscv64 +compiler/c2/irTests/TestFPComparison.java 0 linux-riscv64 + +# tier1_compiler_3 + +compiler/loopopts/TestUnreachableInnerLoop.java 0 linux-riscv64 +compiler/vectorization/TestAutoVecIntMinMax.java 0 linux-riscv64 + +# tier1_gc + +gc/arguments/TestUseCompressedOopsFlagsWithUlimit.java 0 linux-riscv64 + +# :tier1_runtime + +runtime/cds/CheckDefaultArchiveFile.java 0 linux-riscv64 +runtime/LoadClass/LongBCP.java 0 linux-riscv64 +runtime/os/TestTracePageSizes.java#compiler-options 0 linux-riscv64 +runtime/os/TestTracePageSizes.java#G1 0 linux-riscv64 +runtime/os/TestTracePageSizes.java#Parallel 0 linux-riscv64 +runtime/os/TestTracePageSizes.java#Serial 0 linux-riscv64 + +# tier1_serviceability + +serviceability/dcmd/framework/HelpTest.java 0 linux-riscv64 +serviceability/dcmd/framework/InvalidCommandTest.java 0 linux-riscv64 +serviceability/dcmd/framework/VMVersionTest.java 0 linux-riscv64 +serviceability/tmtools/jstat/GcCapacityTest.java 0 linux-riscv64 +serviceability/tmtools/jstat/GcCauseTest01.java 0 linux-riscv64 +serviceability/tmtools/jstat/GcCauseTest02.java 0 linux-riscv64 +serviceability/tmtools/jstat/GcCauseTest03.java 0 linux-riscv64 +serviceability/tmtools/jstat/GcNewTest.java 0 linux-riscv64 +serviceability/tmtools/jstat/GcTest01.java 0 linux-riscv64 +serviceability/tmtools/jstat/GcTest02.java 0 linux-riscv64 \ No newline at end of file diff --git a/test/jdk/ProblemList-GHA.txt b/test/jdk/ProblemList-GHA.txt new file mode 100644 index 0000000000000..e93af7dbc3b71 --- /dev/null +++ b/test/jdk/ProblemList-GHA.txt @@ -0,0 +1,31 @@ +# +# Copyright (c) 2022, Rivos Inc. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. +# +# This code is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +# version 2 for more details (a copy is included in the LICENSE file that +# accompanied this code). +# +# You should have received a copy of the GNU General Public License version +# 2 along with this work; if not, write to the Free Software Foundation, +# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. +# +# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +# jdk / tier1_part_1 + +java/lang/ProcessHandle/InfoTest.java 0 linux-riscv64 +java/lang/invoke/lambda/LogGeneratedClassesTest.java 0 linux-riscv64 + +# jdk / tier1_part_2 + +java/util/concurrent/locks/Lock/TimedAcquireLeak.java 0 linux-riscv64 diff --git a/test/langtools/ProblemList-GHA.txt b/test/langtools/ProblemList-GHA.txt new file mode 100644 index 0000000000000..e88cfebbc063d --- /dev/null +++ b/test/langtools/ProblemList-GHA.txt @@ -0,0 +1,28 @@ +# +# Copyright (c) 2022, Rivos Inc. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. +# +# This code is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +# version 2 for more details (a copy is included in the LICENSE file that +# accompanied this code). +# +# You should have received a copy of the GNU General Public License version +# 2 along with this work; if not, write to the Free Software Foundation, +# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. +# +# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +jdk/jshell/CommandCompletionTest.java 0 linux-riscv64 +jdk/jshell/ForwardReferenceImportTest.java 0 linux-riscv64 +jdk/jshell/ToolProviderTest.java 0 linux-riscv64 +jdk/jshell/ToolTabSnippetTest.java 0 linux-riscv64 +tools/javac/ClassPathTest/ClassPathTest.java 0 linux-riscv64