From 0247c2d5ffc9ba77d84616273acf96d9d40893b4 Mon Sep 17 00:00:00 2001 From: Ryan Roberts Date: Wed, 30 Oct 2024 14:42:20 +0000 Subject: [PATCH 1/4] run: Update FVP version to 11.27 As of 11.27, ScalableVectorExtension.so plugin is no longer included with the model. Instead, the equivalent functionality is included directly in the model so remove references to the plugin. SVE/SME configuration parameters have also moved, so we also update the relevant configs: SVE.ScalableVectorExtension. -> cluster[01].sve. SVE is enabled via cluster[01].has_sve=1 Signed-off-by: Ryan Roberts --- config/arch/v8.2.yaml | 3 ++- config/arch/v9.0.yaml | 3 ++- config/arch/v9.2.yaml | 3 ++- config/arch/v9.3.yaml | 3 ++- docker/build.sh | 8 ++++---- 5 files changed, 12 insertions(+), 8 deletions(-) diff --git a/config/arch/v8.2.yaml b/config/arch/v8.2.yaml index ecaec2d..32dc7d4 100644 --- a/config/arch/v8.2.yaml +++ b/config/arch/v8.2.yaml @@ -24,4 +24,5 @@ run: -C cluster1.has_arm_v8-2: 1 -C cluster0.has_large_va: 1 # Implement support for the extended 52-bit virtual addresses from ARMv8.2 (FEAT_LVA). 2:feature is implemented. -C cluster1.has_large_va: 1 - --plugin: $$(which ScalableVectorExtension.so) + -C cluster0.has_sve: 1 # Whether SVE is implemented (FEAT_SVE). + -C cluster1.has_sve: 1 diff --git a/config/arch/v9.0.yaml b/config/arch/v9.0.yaml index 170418e..c9f46a8 100644 --- a/config/arch/v9.0.yaml +++ b/config/arch/v9.0.yaml @@ -25,4 +25,5 @@ run: -C cluster1.has_arm_v9-0: 1 -C cluster0.max_32bit_el: 0 # Maximum exception level supporting AArch32 modes. -1: No Support for A32 at any EL, x:[0:3] - All the levels below supplied ELx supports A32 -C cluster1.max_32bit_el: 0 - -C SVE.ScalableVectorExtension.has_sve2: 1 # Whether SVE2 is implemented (FEAT_SVE2). + -C cluster0.sve.has_sve2: 1 # Whether SVE2 is implemented (FEAT_SVE2). + -C cluster1.sve.has_sve2: 1 diff --git a/config/arch/v9.2.yaml b/config/arch/v9.2.yaml index e909d4a..805c2a8 100644 --- a/config/arch/v9.2.yaml +++ b/config/arch/v9.2.yaml @@ -25,4 +25,5 @@ run: -C cluster1.has_arm_v9-2: 1 -C cluster0.has_brbe: 1 # If true, implements branch record buffer extension (FEAT_BRBE). -C cluster1.has_brbe: 1 - -C SVE.ScalableVectorExtension.has_sme: 1 # Whether SME is implemented + -C cluster0.sve.has_sme: 1 # Whether SME is implemented + -C cluster1.sve.has_sme: 1 diff --git a/config/arch/v9.3.yaml b/config/arch/v9.3.yaml index aa9a721..571a64d 100644 --- a/config/arch/v9.3.yaml +++ b/config/arch/v9.3.yaml @@ -19,4 +19,5 @@ run: -C cluster1.has_arm_v9-3: 1 -C cluster0.has_brbe_v1p1: 1 # If true, implements FEAT_BRBEv1p1. -C cluster1.has_brbe_v1p1: 1 - -C SVE.ScalableVectorExtension.has_sme2: 1 # Whether SME2 is implemented (FEAT_SME2) + -C cluster0.sve.has_sme2: 1 # Whether SME2 is implemented (FEAT_SME2) + -C cluster1.sve.has_sme2: 1 diff --git a/docker/build.sh b/docker/build.sh index 965face..65f966d 100755 --- a/docker/build.sh +++ b/docker/build.sh @@ -108,8 +108,8 @@ if [ "${ARCH}" = "x86_64" ]; then TCH_PKG_URL_AARCH32=https://developer.arm.com/-/media/Files/downloads/gnu/13.2.rel1/binrel TCH_PKG_NAME_AARCH32=arm-gnu-toolchain-13.2.rel1-x86_64-arm-none-eabi.tar.xz TCH_PATH_AARCH32=arm-gnu-toolchain-13.2.Rel1-x86_64-arm-none-eabi/bin - FVP_PKG_URL=https://developer.arm.com/-/media/Files/downloads/ecosystem-models - FVP_PKG_NAME=FVP_Base_RevC-2xAEMvA_11.24_11_Linux64.tgz + FVP_PKG_URL=https://developer.arm.com/-/cdn-downloads/permalink/Fixed-Virtual-Platforms/FM-11.27 + FVP_PKG_NAME=FVP_Base_RevC-2xAEMvA_11.27_19_Linux64.tgz FVP_MODEL_DIR=Base_RevC_AEMvA_pkg/models/Linux64_GCC-9.3 FVP_PLUGIN_DIR=Base_RevC_AEMvA_pkg/plugins/Linux64_GCC-9.3 # ARCH is "aarch64" on Ubuntu, or "arm64" on Mac OS @@ -123,8 +123,8 @@ elif [ "${ARCH}" = "aarch64" ] || [ "${ARCH}" = "arm64" ]; then TCH_PKG_URL_AARCH32=https://developer.arm.com/-/media/Files/downloads/gnu/13.2.rel1/binrel TCH_PKG_NAME_AARCH32=arm-gnu-toolchain-13.2.rel1-aarch64-arm-none-eabi.tar.xz TCH_PATH_AARCH32=arm-gnu-toolchain-13.2.Rel1-aarch64-arm-none-eabi/bin - FVP_PKG_URL=https://developer.arm.com/-/media/Files/downloads/ecosystem-models - FVP_PKG_NAME=FVP_Base_RevC-2xAEMvA_11.24_11_Linux64_armv8l.tgz + FVP_PKG_URL=https://developer.arm.com/-/cdn-downloads/permalink/Fixed-Virtual-Platforms/FM-11.27 + FVP_PKG_NAME=FVP_Base_RevC-2xAEMvA_11.27_19_Linux64_armv8l.tgz FVP_MODEL_DIR=Base_RevC_AEMvA_pkg/models/Linux64_armv8l_GCC-9.3 FVP_PLUGIN_DIR=Base_RevC_AEMvA_pkg/plugins/Linux64_armv8l_GCC-9.3 else -- GitLab From 82c0b501c62821c1e2500a1d73e5055e3b9fc79f Mon Sep 17 00:00:00 2001 From: Ryan Roberts Date: Wed, 30 Oct 2024 15:04:08 +0000 Subject: [PATCH 2/4] docs: Remove refs to ScalableVectorExtension.so Since the ScalableVectorExtension.so plugin functionality is now implemented directly by the FVP, let's remove references to it and it's parameters from the documentation. It turns out some of the output examples in the quickstart guide were a little out of date, hence the noise introduced by generating new ones. Signed-off-by: Ryan Roberts --- documentation/userguide/quickstart.rst | 356 +++++++++++++------------ documentation/userguide/recipes.rst | 6 +- 2 files changed, 194 insertions(+), 168 deletions(-) diff --git a/documentation/userguide/quickstart.rst b/documentation/userguide/quickstart.rst index 848aea0..27774bd 100644 --- a/documentation/userguide/quickstart.rst +++ b/documentation/userguide/quickstart.rst @@ -709,22 +709,17 @@ Alternatively, you could have passed ``--dry-run`` to see the FVP invocation scr function finish { rm -rf $SEMIHOSTDIR; } trap finish EXIT cp ./path/to/Image ${SEMIHOSTDIR}/Image - cp /package/ns-edk2/fvp-base-revc_args.dtb ${SEMIHOSTDIR}/fdt.dtb + cp /package/ns-edk2/dt_bootargs.dtb ${SEMIHOSTDIR}/fdt.dtb cat < ${SEMIHOSTDIR}/startup.nsh Image dtb=fdt.dtb console=ttyAMA0 earlycon=pl011,0x1c090000 root=/dev/vda ip=dhcp EOF # Run the model. FVP_Base_RevC-2xAEMvA \ - --plugin=$(which ScalableVectorExtension.so) \ --stat \ - -C SVE.ScalableVectorExtension.has_sme2=1 \ - -C SVE.ScalableVectorExtension.has_sme=1 \ - -C SVE.ScalableVectorExtension.has_sve2=1 \ - -C bp.dram_metadata.is_enabled=1 \ -C bp.dram_size=4 \ -C bp.flashloader0.fname=/package/ns-edk2/fip.bin \ - -C bp.flashloader1.fname=/package/ns-edk2/edk2-flash.img \ + -C bp.flashloader1.fname= \ -C bp.hostbridge.userNetPorts=8022=22 \ -C bp.hostbridge.userNetworking=1 \ -C bp.refcounter.non_arch_start_at_default=1 \ @@ -741,7 +736,9 @@ Alternatively, you could have passed ``--dry-run`` to see the FVP invocation scr -C bp.terminal_3.mode=raw \ -C bp.terminal_3.start_telnet=0 \ -C bp.ve_sysregs.exit_on_shutdown=1 \ + -C bp.virtio_rng.enabled=1 \ -C bp.virtioblockdevice.image_path=./path/to/rootfs.img \ + -C bp.virtiop9device.root_path= \ -C bp.vis.disable_visualisation=1 \ -C cache_state_modelled=0 \ -C cluster0.NUM_CORES=4 \ @@ -776,10 +773,13 @@ Alternatively, you could have passed ``--dry-run`` to see the FVP invocation scr -C cluster0.has_large_system_ext=1 \ -C cluster0.has_large_va=1 \ -C cluster0.has_rndr=1 \ + -C cluster0.has_sve=1 \ -C cluster0.max_32bit_el=0 \ - -C cluster0.memory_tagging_support_level=3 \ -C cluster0.pmb_idr_external_abort=1 \ -C cluster0.stage12_tlb_size=1024 \ + -C cluster0.sve.has_sme2=1 \ + -C cluster0.sve.has_sme=1 \ + -C cluster0.sve.has_sve2=1 \ -C cluster1.NUM_CORES=4 \ -C cluster1.PA_SIZE=48 \ -C cluster1.check_memory_attributes=0 \ @@ -811,21 +811,22 @@ Alternatively, you could have passed ``--dry-run`` to see the FVP invocation scr -C cluster1.has_large_system_ext=1 \ -C cluster1.has_large_va=1 \ -C cluster1.has_rndr=1 \ + -C cluster1.has_sve=1 \ -C cluster1.max_32bit_el=0 \ - -C cluster1.memory_tagging_support_level=3 \ -C cluster1.pmb_idr_external_abort=1 \ -C cluster1.stage12_tlb_size=1024 \ + -C cluster1.sve.has_sme2=1 \ + -C cluster1.sve.has_sme=1 \ + -C cluster1.sve.has_sve2=1 \ + -C gic_distributor.has_nmi=1 \ -C pci.pci_smmuv3.mmu.SMMU_AIDR=2 \ - -C pci.pci_smmuv3.mmu.SMMU_IDR0=4592187 \ - -C pci.pci_smmuv3.mmu.SMMU_IDR1=6291458 \ + -C pci.pci_smmuv3.mmu.SMMU_IDR0=135263935 \ + -C pci.pci_smmuv3.mmu.SMMU_IDR1=216481056 \ -C pci.pci_smmuv3.mmu.SMMU_IDR3=5908 \ -C pci.pci_smmuv3.mmu.SMMU_IDR5=4294902901 \ - -C pci.pci_smmuv3.mmu.SMMU_ROOT_IDR0=3 \ - -C pci.pci_smmuv3.mmu.SMMU_ROOT_IIDR=1083 \ -C pci.pci_smmuv3.mmu.SMMU_S_IDR1=2684354562 \ -C pci.pci_smmuv3.mmu.SMMU_S_IDR2=0 \ -C pci.pci_smmuv3.mmu.SMMU_S_IDR3=0 \ - -C pci.pci_smmuv3.mmu.root_register_page_offset=131072 \ -C pctl.startup=0.0.0.0 .. raw:: html @@ -872,41 +873,62 @@ command: --- name: ns-edk2 fullname: ns-edk2.yaml - description: 'Best choice for: I want to run Linux on FVP, booting with ACPI/DT, and - have easy control over its command line. - - Brings together TF-A and EDK2 to provide a simple non-secure world environment running - on FVP. Allows easy specification of the kernel image and command line, and rootfs - at runtime (see rtvars). ACPI is provided by UEFI. - - An extra rtvar is added (DTB) which allows specification of a custom device tree. - By default (if not overriding the rtvar), the upstream kernel device tree is used. - DT is enabled by default. Use ''acpi=force'' to enable ACPI boot. - - By default (if not overriding the rtvars) a sensible command line is used that will - set up the console for logging and attempt to mount the rootfs image from the FVP''s - virtio block device. However the default rootfs image is empty, so the kernel will - panic when attempting to mount; the user must supply a rootfs if it is required - that the kernel completes its boot. No default kernel image is supplied and the - config will refuse to run unless it is explicitly specified. - - Note that by default, UEFI variables are build time configured directing EDK2 - to boot to the shell. This will cause startup.nsh to be executed and will - start the kernel boot. This way everything is automatic. By default, all EDK2 - output is muxed to stdout. If you prefer booting UEFI to its UI, override the - the build pcd parameter `PcdUefiShellDefaultBootEnable` using the overlay - and override terminals 'bp.terminal_0'.type to 'telnet'. + description: "Best choice for: I want to run Linux on FVP, booting with ACPI/DT, and\ + \ have easy control over its command line.\nBrings together TF-A and EDK2 to provide\ + \ a simple non-secure world environment running on FVP. Allows easy specification\ + \ of the kernel image and command line, and rootfs at runtime (see rtvars). ACPI\ + \ is provided by UEFI.\nAn extra rtvar is added (DTB) which allows specification\ + \ of a custom device tree. By default (if not overriding the rtvar), the upstream\ + \ kernel device tree is used. DT is enabled by default. Use 'acpi=force' to enable\ + \ ACPI boot.\nBy default (if not overriding the rtvars) a sensible command line\ + \ is used that will set up the console for logging and attempt to mount the rootfs\ + \ image from the FVP's virtio block device. However the default rootfs image is\ + \ empty, so the kernel will panic when attempting to mount; the user must supply\ + \ a rootfs if it is required that the kernel completes its boot. No default kernel\ + \ image is supplied and the config will refuse to run unless it is explicitly specified.\n\ + Note that by default, UEFI variables are build time configured directing EDK2 to\ + \ boot to the shell. This will cause startup.nsh to be executed and will start the\ + \ kernel boot. This way everything is automatic. By default, all EDK2 output is\ + \ muxed to stdout. If you prefer booting UEFI to its UI, override the the build\ + \ pcd parameter `PcdUefiShellDefaultBootEnable` using the overlay and override terminals\ + \ 'bp.terminal_0'.type to 'telnet'.\nWhen booting with device tree, a directory\ + \ can optionally be shared from the host system into the Linux environment running\ + \ in the FVP. To do so, set the SHARE rtvar to the desired directory, then mount\ + \ the share inside the FVP with the following (or automate it in fstab):\n.. code-block::\ + \ shell\n # mkdir /share\n # mount -t 9p -o trans=virtio,version=9p2000.L FM /share" + image: null concrete: true graph: {} build: + acpica: + repo: + .: + remote: https://github.com/acpica/acpica.git + revision: R06_28_23 + sync: null + sourcedir: null + builddir: null + toolchain: null + stderrfilt: null + params: {} + prebuild: [] + build: + - rm -rf ${param:sourcedir}/generate/unix/acpica + - make -j${param:jobs} + - mv ${param:sourcedir}/generate/unix/bin ${param:sourcedir}/generate/unix/acpica + postbuild: [] + artifacts: + ACPICA: ${param:sourcedir}/generate/unix/acpica dt: repo: .: - remote: git://git.kernel.org/pub/scm/linux/kernel/git/devicetree/devicetree-rebasing.git - revision: v6.1-dts + remote: https://git.kernel.org/pub/scm/linux/kernel/git/devicetree/devicetree-rebasing.git + revision: v6.6-dts + sync: null sourcedir: null builddir: null toolchain: aarch64-none-elf- + stderrfilt: null params: {} prebuild: - DTS=fvp-base-revc.dts @@ -958,16 +980,15 @@ command: repo: edk2: remote: https://github.com/tianocore/edk2.git - revision: edk2-stable202211 + revision: edk2-stable202311 edk2-platforms: remote: https://github.com/tianocore/edk2-platforms.git - revision: 20e07099d8f11889d101dd710ca85001be20e179 - acpica: - remote: https://github.com/acpica/acpica.git - revision: R10_20_22 + revision: 4b07df2e6f3813c6e955197dacb2cdfbe3471caa + sync: null sourcedir: null builddir: null toolchain: aarch64-none-elf- + stderrfilt: true params: -a: AARCH64 -t: GCC5 @@ -979,11 +1000,10 @@ command: - export WORKSPACE=${param:sourcedir} - export GCC5_AARCH64_PREFIX=$$CROSS_COMPILE - export PACKAGES_PATH=$$WORKSPACE/edk2:$$WORKSPACE/edk2-platforms - - export IASL_PREFIX=$$WORKSPACE/acpica/generate/unix/bin/ + - export IASL_PREFIX=${artifact:ACPICA}/ - export PYTHON_COMMAND=/usr/bin/python3 build: - - make -j${param:jobs} -C acpica - - source edk2/edksetup.sh + - source edk2/edksetup.sh --reconfig - make -j${param:jobs} -C edk2/BaseTools - build -n ${param:jobs} -D EDK2_OUT_DIR=${param:builddir} ${param:join_space} postbuild: [] @@ -993,165 +1013,171 @@ command: repo: .: remote: https://git.trustedfirmware.org/TF-A/trusted-firmware-a.git - revision: v2.8.0 + revision: v2.11 + sync: null sourcedir: null builddir: null toolchain: aarch64-none-elf- + stderrfilt: null params: PLAT: fvp - DEBUG: 0 - LOG_LEVEL: 40 - ARM_DISABLE_TRUSTED_WDOG: 1 - FVP_HW_CONFIG_DTS: fdts/fvp-base-gicv3-psci-1t.dts BL33: ${artifact:EDK2} - ARM_ARCH_MINOR: 5 - ENABLE_SVE_FOR_NS: 1 - ENABLE_SVE_FOR_SWD: 1 - CTX_INCLUDE_PAUTH_REGS: 1 - BRANCH_PROTECTION: 1 - CTX_INCLUDE_MTE_REGS: 1 - ENABLE_FEAT_HCX: 1 + ARM_ARCH_MAJOR: 9 CTX_INCLUDE_AARCH32_REGS: 0 - ENABLE_SME_FOR_NS: 1 - ENABLE_SME_FOR_SWD: 1 + ARM_ARCH_MINOR: 2 + BRANCH_PROTECTION: 1 + FVP_HW_CONFIG_DTS: fdts/fvp-base-gicv3-psci-1t.dts + LOG_LEVEL: 40 + ARM_DISABLE_TRUSTED_WDOG: 1 + DEBUG: 0 prebuild: [] build: - - make BUILD_BASE=${param:builddir} ${param:join_equal} all fip + - 'make BUILD_BASE=${param:builddir} ${param:join_equal} -j$$(( ${param:jobs} + < 8 ? ${param:jobs} : 8 )) all fip' postbuild: [] artifacts: + FIP: ${param:builddir}/fvp/release/fip.bin BL1: ${param:builddir}/fvp/release/bl1.bin - BL2: ${param:builddir}/fvp/release/bl2.bin BL31: ${param:builddir}/fvp/release/bl31.bin - FIP: ${param:builddir}/fvp/release/fip.bin + BL2: ${param:builddir}/fvp/release/bl2.bin + buildex: + btvars: {} artifacts: {} run: name: FVP_Base_RevC-2xAEMvA rtvars: - LOCAL_NET_PORT: + CMDLINE: type: string - value: 8022 + value: console=ttyAMA0 earlycon=pl011,0x1c090000 root=/dev/vda ip=dhcp BL1: type: path value: ${artifact:BL1} - FIP: - type: path - value: ${artifact:FIP} DTB: type: path value: ${artifact:DTB} - CMDLINE: - type: string - value: console=ttyAMA0 earlycon=pl011,0x1c090000 root=/dev/vda ip=dhcp KERNEL: type: path value: null + FIP: + type: path + value: ${artifact:FIP} + EDK2FLASH: + type: path + value: '' ROOTFS: type: path value: '' - EDK2FLASH: + SHARE: type: path value: '' + LOCAL_NET_PORT: + type: string + value: 8022 params: + -C cluster1.stage12_tlb_size: 1024 + -C cluster1.check_memory_attributes: 0 + -C cluster0.gicv4.mask-virtual-interrupt: 1 + -C bp.hostbridge.userNetworking: 1 + -C bp.flashloader0.fname: ${rtvar:FIP} + -C pci.pci_smmuv3.mmu.SMMU_IDR1: 216481056 + -C cluster0.gicv3.without-DS-support: 1 + -C cluster1.has_arm_v8-3: 1 + -C cluster0.has_sve: 1 + -C cluster1.has_arm_v8-4: 1 + -C cluster0.sve.has_sme: 1 + -C cluster0.gicv3.cpuintf-mmap-access-level: 2 + -C cluster0.has_amu: 1 + -C cluster1.has_arm_v8-8: 1 + -C cluster1.has_brbe: 1 -C bp.dram_size: 4 - -C cluster0.NUM_CORES: 4 + -C cluster1.pmb_idr_external_abort: 1 + -C cluster1.has_arm_v9-0: 1 + -C bp.virtioblockdevice.image_path: ${rtvar:ROOTFS} + -C cluster1.has_arm_v8-5: 1 + -C cluster0.has_arm_v8-3: 1 + -C cluster1.has_arm_v8-6: 1 + -C cluster1.has_hpmn0: 1 + -C bp.virtiop9device.root_path: ${rtvar:SHARE} + -C cluster0.has_hpmn0: 1 + -C pci.pci_smmuv3.mmu.SMMU_IDR0: 135263935 -C cluster1.NUM_CORES: 4 + -C cluster1.gicv3.cpuintf-mmap-access-level: 2 + -C cluster0.has_arm_v8-6: 1 + -C cluster1.has_amu: 1 + -C cluster1.enhanced_pac2_level: 3 + -C cache_state_modelled: 0 + -C cluster0.sve.has_sve2: 1 + -C cluster0.cpu0.semihosting-cwd: $${SEMIHOSTDIR} + -C bp.virtio_rng.enabled: 1 + -C cluster0.has_arm_v9-0: 1 + -C cluster0.has_arm_v9-3: 1 + -C cluster1.sve.has_sve2: 1 + -C cluster0.has_rndr: 1 + -C cluster1.has_arm_v9-2: 1 + -C gic_distributor.has_nmi: 1 + -C pci.pci_smmuv3.mmu.SMMU_S_IDR3: 0 + -C cluster0.has_brbe_v1p1: 1 + -C cluster0.has_branch_target_exception: 1 + -C bp.refcounter.use_real_time: 0 -C cluster0.PA_SIZE: 48 + -C pci.pci_smmuv3.mmu.SMMU_S_IDR1: 2684354562 + -C cluster1.max_32bit_el: 0 + -C cluster0.has_arm_v9-2: 1 + -C cluster0.has_arm_v8-8: 1 -C cluster1.PA_SIZE: 48 - --stat: null - -C bp.vis.disable_visualisation: 1 - -C bp.dram_metadata.is_enabled: 1 - -C bp.refcounter.non_arch_start_at_default: 1 - -C bp.refcounter.use_real_time: 0 + -C cluster1.gicv3.without-DS-support: 1 + -C cluster0.has_arm_v9-1: 1 + -C cluster1.has_large_system_ext: 1 + -C cluster0.sve.has_sme2: 1 + -C cluster0.NUM_CORES: 4 -C bp.secure_memory: 1 - -C bp.ve_sysregs.exit_on_shutdown: 1 - -C pctl.startup: 0.0.0.0 - -C cluster0.clear_reg_top_eret: 2 - -C cluster1.clear_reg_top_eret: 2 - -C bp.smsc_91c111.enabled: 1 - -C bp.hostbridge.userNetworking: 1 -C bp.hostbridge.userNetPorts: ${rtvar:LOCAL_NET_PORT}=22 - -C cache_state_modelled: 0 - -C cluster0.stage12_tlb_size: 1024 - -C cluster1.stage12_tlb_size: 1024 - -C cluster0.check_memory_attributes: 0 - -C cluster1.check_memory_attributes: 0 - -C cluster0.gicv3.cpuintf-mmap-access-level: 2 - -C cluster1.gicv3.cpuintf-mmap-access-level: 2 - -C cluster0.gicv3.without-DS-support: 1 - -C cluster1.gicv3.without-DS-support: 1 - -C cluster0.gicv4.mask-virtual-interrupt: 1 + -C cluster0.ecv_support_level: 2 + -C bp.flashloader1.fname: ${rtvar:EDK2FLASH} + -C cluster1.sve.has_sme: 1 + -C cluster0.has_16k_granule: 1 + -C cluster0.has_large_system_ext: 1 + -C cluster1.has_rndr: 1 -C cluster1.gicv4.mask-virtual-interrupt: 1 - -C pci.pci_smmuv3.mmu.SMMU_AIDR: 2 - -C pci.pci_smmuv3.mmu.SMMU_IDR0: 4592187 - -C pci.pci_smmuv3.mmu.SMMU_IDR1: 6291458 - -C pci.pci_smmuv3.mmu.SMMU_IDR3: 5908 + -C bp.refcounter.non_arch_start_at_default: 1 + -C cluster0.pmb_idr_external_abort: 1 -C pci.pci_smmuv3.mmu.SMMU_IDR5: 4294902901 - -C pci.pci_smmuv3.mmu.SMMU_S_IDR1: 2684354562 -C pci.pci_smmuv3.mmu.SMMU_S_IDR2: 0 - -C pci.pci_smmuv3.mmu.SMMU_S_IDR3: 0 - -C bp.virtio_rng.enabled: 1 - -C bp.secureflashloader.fname: ${rtvar:BL1} - -C bp.flashloader0.fname: ${rtvar:FIP} - -C bp.virtioblockdevice.image_path: ${rtvar:ROOTFS} - -C cluster0.cpu0.semihosting-cwd: $${SEMIHOSTDIR} - -C bp.flashloader1.fname: ${rtvar:EDK2FLASH} - -C cluster0.has_16k_granule: 1 - -C cluster1.has_16k_granule: 1 - -C cluster0.has_arm_v8-1: 1 -C cluster1.has_arm_v8-1: 1 - -C cluster0.has_large_system_ext: 1 - -C cluster1.has_large_system_ext: 1 - -C cluster0.has_arm_v8-2: 1 -C cluster1.has_arm_v8-2: 1 - -C cluster0.has_large_va: 1 - -C cluster1.has_large_va: 1 - --plugin: $$(which ScalableVectorExtension.so) - -C cluster0.has_arm_v8-3: 1 - -C cluster1.has_arm_v8-3: 1 - -C cluster0.has_arm_v8-4: 1 - -C cluster1.has_arm_v8-4: 1 - -C cluster0.has_amu: 1 - -C cluster1.has_amu: 1 - -C cluster0.has_arm_v8-5: 1 - -C cluster1.has_arm_v8-5: 1 - -C cluster0.has_branch_target_exception: 1 -C cluster1.has_branch_target_exception: 1 - -C cluster0.has_rndr: 1 - -C cluster1.has_rndr: 1 - -C cluster0.memory_tagging_support_level: 3 - -C cluster1.memory_tagging_support_level: 3 - -C cluster0.has_arm_v8-6: 1 - -C cluster1.has_arm_v8-6: 1 - -C cluster0.ecv_support_level: 2 - -C cluster1.ecv_support_level: 2 + --stat: null + -C cluster0.has_arm_v8-4: 1 + -C cluster0.max_32bit_el: 0 + -C cluster1.has_16k_granule: 1 + -C cluster1.has_brbe_v1p1: 1 + -C cluster0.has_arm_v8-2: 1 + -C cluster1.has_const_pac: 1 -C cluster0.enhanced_pac2_level: 3 - -C cluster1.enhanced_pac2_level: 3 - -C cluster0.has_arm_v8-7: 1 + -C cluster1.clear_reg_top_eret: 2 + -C bp.vis.disable_visualisation: 1 + -C cluster0.has_arm_v8-1: 1 + -C bp.ve_sysregs.exit_on_shutdown: 1 + -C pctl.startup: 0.0.0.0 -C cluster1.has_arm_v8-7: 1 - -C cluster0.has_arm_v8-8: 1 - -C cluster1.has_arm_v8-8: 1 - -C cluster0.has_const_pac: 1 - -C cluster1.has_const_pac: 1 - -C cluster0.has_hpmn0: 1 - -C cluster1.has_hpmn0: 1 - -C cluster0.pmb_idr_external_abort: 1 - -C cluster1.pmb_idr_external_abort: 1 - -C cluster0.has_arm_v9-0: 1 - -C cluster1.has_arm_v9-0: 1 - -C cluster0.max_32bit_el: 0 - -C cluster1.max_32bit_el: 0 - -C SVE.ScalableVectorExtension.has_sve2: 1 - -C cluster0.has_arm_v9-1: 1 + -C bp.smsc_91c111.enabled: 1 + -C cluster1.ecv_support_level: 2 + -C bp.secureflashloader.fname: ${rtvar:BL1} + -C cluster0.has_arm_v8-5: 1 -C cluster1.has_arm_v9-1: 1 - -C cluster0.has_arm_v9-2: 1 - -C cluster1.has_arm_v9-2: 1 - -C cluster0.has_brbe: 1 - -C cluster1.has_brbe: 1 - -C SVE.ScalableVectorExtension.has_sme: 1 - -C cluster0.has_arm_v9-3: 1 + -C cluster1.has_sve: 1 + -C pci.pci_smmuv3.mmu.SMMU_AIDR: 2 + -C cluster1.has_large_va: 1 + -C cluster0.has_const_pac: 1 + -C cluster0.clear_reg_top_eret: 2 + -C pci.pci_smmuv3.mmu.SMMU_IDR3: 5908 + -C cluster0.check_memory_attributes: 0 -C cluster1.has_arm_v9-3: 1 - -C cluster0.has_brbe_v1p1: 1 - -C cluster1.has_brbe_v1p1: 1 + -C cluster1.sve.has_sme2: 1 + -C cluster0.stage12_tlb_size: 1024 + -C cluster0.has_arm_v8-7: 1 + -C cluster0.has_brbe: 1 + -C cluster0.has_large_va: 1 prerun: - SEMIHOSTDIR=`mktemp -d` - function finish { rm -rf $$SEMIHOSTDIR; } @@ -1163,15 +1189,9 @@ command: - EOF run: [] terminals: - bp.terminal_0: - friendly: '' - port_regex: 'terminal_0: Listening for serial connection on port (\d+)' - type: stdinout - no_color: true - no_escapes: 'EFI stub: Booting Linux Kernel...' bp.terminal_1: - friendly: edk2 port_regex: 'terminal_1: Listening for serial connection on port (\d+)' + friendly: edk2 type: stdout bp.terminal_2: friendly: term2 @@ -1181,6 +1201,12 @@ command: friendly: term3 port_regex: 'terminal_3: Listening for serial connection on port (\d+)' type: stdout + bp.terminal_0: + friendly: '' + type: stdinout + no_escapes: 'EFI stub: Booting Linux Kernel...' + port_regex: 'terminal_0: Listening for serial connection on port (\d+)' + no_color: true .. raw:: html diff --git a/documentation/userguide/recipes.rst b/documentation/userguide/recipes.rst index c71bbae..29b2104 100644 --- a/documentation/userguide/recipes.rst +++ b/documentation/userguide/recipes.rst @@ -171,9 +171,9 @@ your system, ensuring that the required directories are in your PATH, and invoke ``shrinkwrap run`` with the ``null`` runtime. Shrinkwrap expects both the FVP binary (e.g. FVP_Base_RevC-2xAEMvA) and its -plugins (e.g. ScalableVectorExtension.so) to be on your path. The example below -shows downloading and untaring the FVP and adding the required directories to -the PATH. +plugins (e.g. GenericTrace.so) to be on your path. The example below shows +downloading and untaring the FVP and adding the required directories to the +PATH. .. code-block:: shell -- GitLab From 7f365f67f0a1ab93ab488f973ebb458a4ca4fce4 Mon Sep 17 00:00:00 2001 From: Ryan Roberts Date: Wed, 30 Oct 2024 15:08:51 +0000 Subject: [PATCH 3/4] docker: Don't add FVP plugins directory to PATH Modern FVPs (sometime between 11.24 and 11.27) no longer mark its plugins as being executable. This means we can no longer rely on the convention of adding the plugins directory to the PATH then locating a plugin with `which GenericTrace.so`. Given this no longer works, let's simplify by removing the code that set it up. Fortunately the only usage of this trick within bundled configs was for ScalableVectorExtension.so. But that's just been removed so there are no more users relying on it. If any out-of-tree configs require locating a bundled plugin, the recommended hack is: $$(dirname $$(which FVP_Base_RevC-2xAEMvA))/../../plugins/$$(basename $$(dirname $$(which FVP_Base_RevC-2xAEMvA)))/.so This will cause bash to construct a path relative to the FVP model. The above trick should work for both x86_64 and aarch64. Signed-off-by: Ryan Roberts --- docker/Dockerfile.fvp | 4 +--- docker/build.sh | 6 ------ documentation/userguide/recipes.rst | 9 ++++----- 3 files changed, 5 insertions(+), 14 deletions(-) diff --git a/docker/Dockerfile.fvp b/docker/Dockerfile.fvp index d6cc9d2..8bf01e6 100644 --- a/docker/Dockerfile.fvp +++ b/docker/Dockerfile.fvp @@ -14,7 +14,6 @@ RUN apt-get install --assume-yes --no-install-recommends --option=debug::pkgProb # providing the special name "none". ARG FVP_PKG_NAME ARG FVP_MODEL_DIR -ARG FVP_PLUGIN_DIR COPY assets/${FVP_PKG_NAME} /tools/. RUN cd /tools \ && if [ "${FVP_PKG_NAME}" != "none" ]; then \ @@ -24,5 +23,4 @@ RUN cd /tools \ && cd - ENV FVP_MODEL_DIR="/tools/${FVP_MODEL_DIR}" -ENV FVP_PLUGIN_DIR="/tools/${FVP_PLUGIN_DIR}" -ENV PATH="${FVP_MODEL_DIR}:${FVP_PLUGIN_DIR}:${PATH}" +ENV PATH="${FVP_MODEL_DIR}:${PATH}" diff --git a/docker/build.sh b/docker/build.sh index 65f966d..48f5fd7 100755 --- a/docker/build.sh +++ b/docker/build.sh @@ -111,7 +111,6 @@ if [ "${ARCH}" = "x86_64" ]; then FVP_PKG_URL=https://developer.arm.com/-/cdn-downloads/permalink/Fixed-Virtual-Platforms/FM-11.27 FVP_PKG_NAME=FVP_Base_RevC-2xAEMvA_11.27_19_Linux64.tgz FVP_MODEL_DIR=Base_RevC_AEMvA_pkg/models/Linux64_GCC-9.3 - FVP_PLUGIN_DIR=Base_RevC_AEMvA_pkg/plugins/Linux64_GCC-9.3 # ARCH is "aarch64" on Ubuntu, or "arm64" on Mac OS elif [ "${ARCH}" = "aarch64" ] || [ "${ARCH}" = "arm64" ]; then TCH_PKG_URL_AARCH64=https://developer.arm.com/-/media/Files/downloads/gnu/13.2.rel1/binrel @@ -126,7 +125,6 @@ elif [ "${ARCH}" = "aarch64" ] || [ "${ARCH}" = "arm64" ]; then FVP_PKG_URL=https://developer.arm.com/-/cdn-downloads/permalink/Fixed-Virtual-Platforms/FM-11.27 FVP_PKG_NAME=FVP_Base_RevC-2xAEMvA_11.27_19_Linux64_armv8l.tgz FVP_MODEL_DIR=Base_RevC_AEMvA_pkg/models/Linux64_armv8l_GCC-9.3 - FVP_PLUGIN_DIR=Base_RevC_AEMvA_pkg/plugins/Linux64_armv8l_GCC-9.3 else echo "Host architecture ${ARCH} not supported" usage @@ -174,7 +172,6 @@ if [ "${DRIVER}" = "docker" ]; then --build-arg=BASE=${REGISTRY}/base-slim-nofvp:${VERSION}-${ARCH} \ --build-arg=FVP_PKG_NAME=${FVP_PKG_NAME} \ --build-arg=FVP_MODEL_DIR=${FVP_MODEL_DIR} \ - --build-arg=FVP_PLUGIN_DIR=${FVP_PLUGIN_DIR} \ --file=Dockerfile.fvp \ --tag=${REGISTRY}/base-slim:${VERSION}-${ARCH} \ . @@ -191,7 +188,6 @@ if [ "${DRIVER}" = "docker" ]; then --build-arg=BASE=${REGISTRY}/base-full-nofvp:${VERSION}-${ARCH} \ --build-arg=FVP_PKG_NAME=${FVP_PKG_NAME} \ --build-arg=FVP_MODEL_DIR=${FVP_MODEL_DIR} \ - --build-arg=FVP_PLUGIN_DIR=${FVP_PLUGIN_DIR} \ --file=Dockerfile.fvp \ --tag=${REGISTRY}/base-full:${VERSION}-${ARCH} \ . @@ -220,7 +216,6 @@ elif [ "${DRIVER}" = "kaniko" ]; then --build-arg=BASE=${REGISTRY}/base-slim-nofvp:${VERSION}-${ARCH} \ --build-arg=FVP_PKG_NAME=${FVP_PKG_NAME} \ --build-arg=FVP_MODEL_DIR=${FVP_MODEL_DIR} \ - --build-arg=FVP_PLUGIN_DIR=${FVP_PLUGIN_DIR} \ --dockerfile=Dockerfile.fvp \ --destination=${REGISTRY}/base-slim:${VERSION}-${ARCH} \ --context=. @@ -241,7 +236,6 @@ elif [ "${DRIVER}" = "kaniko" ]; then --build-arg=BASE=${REGISTRY}/base-full-nofvp:${VERSION}-${ARCH} \ --build-arg=FVP_PKG_NAME=${FVP_PKG_NAME} \ --build-arg=FVP_MODEL_DIR=${FVP_MODEL_DIR} \ - --build-arg=FVP_PLUGIN_DIR=${FVP_PLUGIN_DIR} \ --dockerfile=Dockerfile.fvp \ --destination=${REGISTRY}/base-full:${VERSION}-${ARCH} \ --context=. diff --git a/documentation/userguide/recipes.rst b/documentation/userguide/recipes.rst index 29b2104..9385f5d 100644 --- a/documentation/userguide/recipes.rst +++ b/documentation/userguide/recipes.rst @@ -170,16 +170,15 @@ version though. In this case, the simplest approach is to install the FVP on your system, ensuring that the required directories are in your PATH, and invoke ``shrinkwrap run`` with the ``null`` runtime. -Shrinkwrap expects both the FVP binary (e.g. FVP_Base_RevC-2xAEMvA) and its -plugins (e.g. GenericTrace.so) to be on your path. The example below shows -downloading and untaring the FVP and adding the required directories to the -PATH. +Shrinkwrap expects the FVP binary (e.g. FVP_Base_RevC-2xAEMvA) to be on your +path. The example below shows downloading and untaring the FVP and adding the +required directory to the PATH. .. code-block:: shell wget -q -O FVP_Base_RevC-2xAEMvA_11.18_16_Linux64.tgz https://developer.arm.com/-/media/Files/downloads/ecosystem-models/FVP_Base_RevC-2xAEMvA_11.18_16_Linux64.tgz tar xf FVP_Base_RevC-2xAEMvA_11.18_16_Linux64.tgz - export PATH=$PWD/Base_RevC_AEMvA_pkg/models/Linux64_GCC-9.3:$PWD/Base_RevC_AEMvA_pkg/plugins/Linux64_GCC-9.3:$PATH + export PATH=$PWD/Base_RevC_AEMvA_pkg/models/Linux64_GCC-9.3:$PATH shrinkwrap build ns-edk2.yaml shrinkwrap --runtime=null run ns-edk2.yaml --rtvar=KERNEL=path/to/Image -- GitLab From a999a698439f0536f0cbf0702789b01e8b570541 Mon Sep 17 00:00:00 2001 From: Ryan Roberts Date: Thu, 31 Oct 2024 08:59:48 +0000 Subject: [PATCH 4/4] ci: Workaround issue in Kaniko After updating to FVP 11.27, wget fails when trying to download it from developer.arm.com from within the Kaniko container on the CI, when running on an amd64 system: wget: note: TLS certificate validation not implemented wget: TLS error from peer (alert code 80): internal error wget: error getting response: Connection reset by peer This is caused by a busybox/musl issue introduced in v1.9.2 of the Kaniko container image. See https://github.com/GoogleContainerTools/kaniko/issues/2452. Work around this by pinning to v1.9.1 as suggested in the issue. However, while the tip works for arm64, v1.9.1 causes a different problem: Connecting to developer.arm.com (184.28.198.219:443) wget: error getting response: Connection reset by peer So use 'debug' tag for arm64 and 'v1.9.1-debug' tag for amd64. Yuk. Signed-off-by: Ryan Roberts --- .gitlab-ci.yml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index da66f3b..1052a5b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -43,13 +43,17 @@ prep-docker-assets: build-docker-image: stage: build image: - name: gcr.io/kaniko-project/executor:debug + # amd64 pinned to workaround https://github.com/GoogleContainerTools/kaniko/issues/2452 + # With newer versions, issue is triggered when wgetting FVP from arm.com (see docker/build.sh). + # arm64 works with tip but is broken in a different way when pinned to 1.9.1. + name: gcr.io/kaniko-project/executor:${KANIKO_VERSION} entrypoint: [""] parallel: matrix: - - TAG: - - amd64 - - arm64 + - TAG: amd64 + KANIKO_VERSION: v1.9.1-debug + - TAG: arm64 + KANIKO_VERSION: debug tags: - ${TAG} cache: -- GitLab