Add support for Systems with effective HCR_EL2.E2H = 1 #18
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: SYSARCH-ACS Integration Build | |
| on: | |
| push: | |
| branches: # trigger on push to master | |
| - main | |
| pull_request: # trigger on pull requests to master | |
| branches: | |
| - main | |
| workflow_dispatch: # to dispatch from Github Actions | |
| jobs: | |
| build_acpi: | |
| name: BSA-ACS UEFI build for ACPI target | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - name: Install dependencies | |
| run: sudo apt-get update && sudo apt-get install -y git build-essential nasm | |
| - name: Download edk2 and its submodules | |
| run: | | |
| git clone --recursive https://github.com/tianocore/edk2 | |
| cd edk2 | |
| git checkout edk2-stable202411 | |
| cd .. | |
| git clone https://github.com/tianocore/edk2-libc edk2/edk2-libc | |
| - name: Checkout sysarch-acs repository | |
| uses: actions/checkout@v4 | |
| with: | |
| path: 'edk2/ShellPkg/Application/sysarch-acs' | |
| - name: Download Arm GCC cross-compiler | |
| run: | | |
| mkdir -p /opt/cross | |
| cd /opt/cross | |
| wget https://developer.arm.com/-/media/Files/downloads/gnu/13.2.rel1/binrel/arm-gnu-toolchain-13.2.rel1-x86_64-aarch64-none-linux-gnu.tar.xz | |
| tar -xf arm-gnu-toolchain-13.2.rel1-x86_64-aarch64-none-linux-gnu.tar.xz | |
| - name: Set up EDK2 environment and build Bsa.efi | |
| run: | | |
| cd edk2 | |
| export GCC49_AARCH64_PREFIX=/opt/cross/arm-gnu-toolchain-13.2.Rel1-x86_64-aarch64-none-linux-gnu/bin/aarch64-none-linux-gnu- | |
| export PACKAGES_PATH=$PWD/edk2-libc | |
| source edksetup.sh | |
| make -C BaseTools/Source/C | |
| source ShellPkg/Application/sysarch-acs/tools/scripts/acsbuild.sh bsa | |
| - name: Save Bsa.efi as an artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: Bsa_acpi_target.efi | |
| path: edk2/Build/Shell/DEBUG_GCC49/AARCH64/Bsa.efi | |
| if-no-files-found: error | |
| build_dt: | |
| name: BSA-ACS UEFI build for DT target | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - name: Install dependencies | |
| run: sudo apt-get update && sudo apt-get install -y git build-essential nasm | |
| - name: Download edk2 and its submodules | |
| run: | | |
| git clone --recursive https://github.com/tianocore/edk2 | |
| cd edk2 | |
| git checkout edk2-stable202411 | |
| cd .. | |
| git clone https://github.com/tianocore/edk2-libc edk2/edk2-libc | |
| - name: Checkout sysarch-acs repository | |
| uses: actions/checkout@v4 | |
| with: | |
| path: 'edk2/ShellPkg/Application/sysarch-acs' | |
| - name: Download Arm GCC cross-compiler | |
| run: | | |
| mkdir -p /opt/cross | |
| cd /opt/cross | |
| wget https://developer.arm.com/-/media/Files/downloads/gnu/13.2.rel1/binrel/arm-gnu-toolchain-13.2.rel1-x86_64-aarch64-none-linux-gnu.tar.xz | |
| tar -xf arm-gnu-toolchain-13.2.rel1-x86_64-aarch64-none-linux-gnu.tar.xz | |
| - name: Set up EDK2 environment and build Bsa.efi | |
| run: | | |
| cd edk2 | |
| export GCC49_AARCH64_PREFIX=/opt/cross/arm-gnu-toolchain-13.2.Rel1-x86_64-aarch64-none-linux-gnu/bin/aarch64-none-linux-gnu- | |
| export PACKAGES_PATH=$PWD/edk2-libc | |
| source edksetup.sh | |
| make -C BaseTools/Source/C | |
| source ShellPkg/Application/sysarch-acs/tools/scripts/acsbuild.sh bsa_dt | |
| - name: Save Bsa.efi as an artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: Bsa_dt_target.efi | |
| path: edk2/Build/Shell/DEBUG_GCC49/AARCH64/Bsa.efi | |
| if-no-files-found: error | |
| build_sbsa_acpi: | |
| name: SBSA-ACS UEFI build for ACPI target | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - name: Install dependencies | |
| run: sudo apt-get update && sudo apt-get install -y git build-essential nasm | |
| - name: Download edk2 and its submodules | |
| run: | | |
| git clone --recursive https://github.com/tianocore/edk2 | |
| cd edk2 | |
| git checkout edk2-stable202411 | |
| cd .. | |
| git clone https://github.com/tianocore/edk2-libc edk2/edk2-libc | |
| - name: Checkout sysarch-acs repository | |
| uses: actions/checkout@v4 | |
| with: | |
| path: 'edk2/ShellPkg/Application/sysarch-acs' | |
| - name: Download Arm GCC cross-compiler | |
| run: | | |
| mkdir -p /opt/cross | |
| cd /opt/cross | |
| wget https://developer.arm.com/-/media/Files/downloads/gnu/13.2.rel1/binrel/arm-gnu-toolchain-13.2.rel1-x86_64-aarch64-none-linux-gnu.tar.xz | |
| tar -xf arm-gnu-toolchain-13.2.rel1-x86_64-aarch64-none-linux-gnu.tar.xz | |
| - name: Set up EDK2 environment and build Sbsa.efi | |
| run: | | |
| cd edk2 | |
| export GCC49_AARCH64_PREFIX=/opt/cross/arm-gnu-toolchain-13.2.Rel1-x86_64-aarch64-none-linux-gnu/bin/aarch64-none-linux-gnu- | |
| export PACKAGES_PATH=$PWD/edk2-libc | |
| source edksetup.sh | |
| make -C BaseTools/Source/C | |
| source ShellPkg/Application/sysarch-acs/tools/scripts/acsbuild.sh sbsa | |
| ls Build/Shell/DEBUG_GCC49/AARCH64/Sbsa.efi | |
| - name: Save Sbsa.efi as an artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: Sbsa.efi | |
| path: edk2/Build/Shell/DEBUG_GCC49/AARCH64/Sbsa.efi | |
| if-no-files-found: error | |
| build_drtm_acpi: | |
| name: DRTM-ACS UEFI build for ACPI target | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - name: Install dependencies | |
| run: sudo apt-get update && sudo apt-get install -y git build-essential nasm | |
| - name: Download edk2 and its submodules | |
| run: | | |
| git clone --recursive https://github.com/tianocore/edk2 | |
| cd edk2 | |
| git checkout edk2-stable202411 | |
| cd .. | |
| git clone https://github.com/tianocore/edk2-libc edk2/edk2-libc | |
| - name: Checkout sysarch-acs repository | |
| uses: actions/checkout@v4 | |
| with: | |
| path: 'edk2/ShellPkg/Application/sysarch-acs' | |
| - name: Download Arm GCC cross-compiler | |
| run: | | |
| mkdir -p /opt/cross | |
| cd /opt/cross | |
| wget https://developer.arm.com/-/media/Files/downloads/gnu/13.2.rel1/binrel/arm-gnu-toolchain-13.2.rel1-x86_64-aarch64-none-linux-gnu.tar.xz | |
| tar -xf arm-gnu-toolchain-13.2.rel1-x86_64-aarch64-none-linux-gnu.tar.xz | |
| - name: Set up EDK2 environment and build Drtm.efi | |
| run: | | |
| cd edk2 | |
| export GCC49_AARCH64_PREFIX=/opt/cross/arm-gnu-toolchain-13.2.Rel1-x86_64-aarch64-none-linux-gnu/bin/aarch64-none-linux-gnu- | |
| export PACKAGES_PATH=$PWD/edk2-libc | |
| source edksetup.sh | |
| make -C BaseTools/Source/C | |
| source ShellPkg/Application/sysarch-acs/tools/scripts/acsbuild.sh drtm | |
| - name: Save Drtm.efi as an artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: Drtm_acpi_target.efi | |
| path: edk2/Build/Shell/DEBUG_GCC49/AARCH64/Drtm.efi | |
| if-no-files-found: error | |
| build_mpam_acpi: | |
| name: MPAM-ACS UEFI build for ACPI target | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - name: Install dependencies | |
| run: sudo apt-get update && sudo apt-get install -y git build-essential nasm | |
| - name: Download edk2 and its submodules | |
| run: | | |
| git clone --recursive https://github.com/tianocore/edk2 | |
| cd edk2 | |
| git checkout edk2-stable202411 | |
| cd .. | |
| git clone https://github.com/tianocore/edk2-libc edk2/edk2-libc | |
| - name: Checkout sysarch-acs repository | |
| uses: actions/checkout@v4 | |
| with: | |
| path: 'edk2/ShellPkg/Application/sysarch-acs' | |
| - name: Download Arm GCC cross-compiler | |
| run: | | |
| mkdir -p /opt/cross | |
| cd /opt/cross | |
| wget https://developer.arm.com/-/media/Files/downloads/gnu/13.2.rel1/binrel/arm-gnu-toolchain-13.2.rel1-x86_64-aarch64-none-linux-gnu.tar.xz | |
| tar -xf arm-gnu-toolchain-13.2.rel1-x86_64-aarch64-none-linux-gnu.tar.xz | |
| - name: Set up EDK2 environment and build Mpam.efi | |
| run: | | |
| cd edk2 | |
| export GCC49_AARCH64_PREFIX=/opt/cross/arm-gnu-toolchain-13.2.Rel1-x86_64-aarch64-none-linux-gnu/bin/aarch64-none-linux-gnu- | |
| export PACKAGES_PATH=$PWD/edk2-libc | |
| source edksetup.sh | |
| make -C BaseTools/Source/C | |
| source ShellPkg/Application/sysarch-acs/tools/scripts/acsbuild.sh mpam | |
| - name: Save Mpam.efi as an artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: Mpam_acpi_target.efi | |
| path: edk2/Build/Shell/DEBUG_GCC49/AARCH64/Mpam.efi | |
| if-no-files-found: error | |
| bsa-baremetal-compilation: | |
| name: BSA Baremetal CMake compilation check | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - name: Checkout sysarch-acs repository | |
| uses: actions/checkout@v4 | |
| - name: Remove build folder if present in sysarch-acs | |
| run: | | |
| rm -rf build | |
| - name: Download Arm GCC cross-compiler | |
| run: | | |
| mkdir -p /opt/cross | |
| cd /opt/cross | |
| wget https://developer.arm.com/-/media/Files/downloads/gnu/13.2.rel1/binrel/arm-gnu-toolchain-13.2.rel1-x86_64-aarch64-none-elf.tar.xz | |
| tar -xf arm-gnu-toolchain-13.2.rel1-x86_64-aarch64-none-elf.tar.xz | |
| - name: Compile BSA Baremetal ACS for RDN2 Platform | |
| run: | | |
| export CROSS_COMPILE=/opt/cross/arm-gnu-toolchain-13.2.Rel1-x86_64-aarch64-none-elf/bin/aarch64-none-elf- | |
| mkdir build | |
| cd build | |
| cmake ../ -G "Unix Makefiles" -DTARGET=RDN2 | |
| make bsa | |
| - name: Save Baremetel bsa.bin as an artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: Bsa_baremetal_RDN2.bin | |
| path: build/bsa_build/output/bsa.bin | |
| if-no-files-found: error | |
| sbsa-baremetal-compilation: | |
| name: SBSA-ACS Baremetal CMake compilation | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - name: Checkout sysarch-acs repository | |
| uses: actions/checkout@v4 | |
| - name: Remove build folder if present in sysarch-acs | |
| run: | | |
| rm -rf build | |
| - name: Download Arm GCC cross-compiler | |
| run: | | |
| mkdir -p /opt/cross | |
| cd /opt/cross | |
| wget https://developer.arm.com/-/media/Files/downloads/gnu/13.2.rel1/binrel/arm-gnu-toolchain-13.2.rel1-x86_64-aarch64-none-elf.tar.xz | |
| tar -xf arm-gnu-toolchain-13.2.rel1-x86_64-aarch64-none-elf.tar.xz | |
| - name: Compile SBSA Baremetal ACS for RDN2 Platform | |
| run: | | |
| export CROSS_COMPILE=/opt/cross/arm-gnu-toolchain-13.2.Rel1-x86_64-aarch64-none-elf/bin/aarch64-none-elf- | |
| mkdir build | |
| cd build | |
| cmake ../ -G "Unix Makefiles" -DTARGET=RDN2 | |
| make sbsa | |
| - name: Save Baremetel sbsa.bin as an artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: Sbsa_baremetal_RDN2.bin | |
| path: build/sbsa_build/output/sbsa.bin | |
| if-no-files-found: error | |
| linux-compilation: | |
| name: BSA and SBSA linux compilation | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - name: Checkout sysarch-acs repository | |
| uses: actions/checkout@v4 | |
| - name: Download Linux ACS | |
| run: | | |
| cd .. | |
| wget https://gitlab.arm.com/linux-arm/linux-acs/-/raw/master/acs-drv/files/build.sh | |
| chmod +x build.sh | |
| ls | |
| - name: Compile BSA and SBSA Linux ACS module and app | |
| run: | | |
| cd .. | |
| mkdir linux-bsa | |
| mkdir linux-sbsa | |
| ./build.sh | |
| cp build/bsa_acs.ko /home/runner/work/sysarch-acs/linux-bsa/ | |
| cp build/bsa_app /home/runner/work/sysarch-acs/linux-bsa/ | |
| cp build/sbsa_acs.ko /home/runner/work/sysarch-acs/linux-sbsa/ | |
| cp build/sbsa_app /home/runner/work/sysarch-acs/linux-sbsa/ | |
| - name: Save BSA kernel module and app as an artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: BSA Kernel Module and App | |
| path: /home/runner/work/sysarch-acs/linux-bsa/* | |
| if-no-files-found: error | |
| - name: Save SBSA kernel module and app as an artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: SBSA Kernel Module and App | |
| path: /home/runner/work/sysarch-acs/linux-sbsa/* | |
| if-no-files-found: error |