From 52f82d778b83eda05c320d2fd3ade3e53e65b747 Mon Sep 17 00:00:00 2001 From: Sona Mathew Date: Fri, 23 Aug 2024 18:40:27 -0500 Subject: [PATCH 1/4] config: Split cca-3world.yaml to enable cca development use cases Split cca-3world.yaml into 3 discrete layers: - tfa-rme.yaml Builds TF-A, TF-RMM, along with the required device tree, configured for RME with Armv9.2 architecture extension. Intended as a base config from which a variety of concrete cca configs can be built. - cca-edk2.yaml Augments tfa-rme.yaml by adding edk2 as the non-secure EL2 bootloader. This is a concrete config that can be built and used to load a Linux kernel. - cca-3world.yaml Semantically exactly the same as previously; a full cca demo stack. But now its is composed using cca-edk2.yaml (and implicitly tfa-rme.yaml). This approach raises an issue when including ns-edk2.yaml in cca-edk2.yaml, because both it and tfa-rme.yaml include tfa-base.yaml. We end up with 2 copies and it gets built twice, due to the merge rules for lists. Solve this by splitting ns-edk2.yaml into a base part and a concrete part. TF-A is provided by the concrete part only, so that the base part can also be used by cca-edk2.yaml. Co-developed-by: Sona Mathew Signed-off-by: Sona Mathew Signed-off-by: Ryan Roberts --- config/FVP_Base_RevC-2xAEMvA-rme.yaml | 42 ++++++++++++++ config/cca-3world.yaml | 74 +----------------------- config/cca-edk2.yaml | 59 +++++++++++++++++++ config/kvm-unit-tests.yaml | 28 +++++++++ config/ns-edk2-base.yaml | 83 +++++++++++++++++++++++++++ config/ns-edk2.yaml | 74 +----------------------- config/tfa-rme.yaml | 29 ++++++++++ 7 files changed, 244 insertions(+), 145 deletions(-) create mode 100644 config/FVP_Base_RevC-2xAEMvA-rme.yaml create mode 100644 config/cca-edk2.yaml create mode 100644 config/kvm-unit-tests.yaml create mode 100644 config/ns-edk2-base.yaml create mode 100644 config/tfa-rme.yaml diff --git a/config/FVP_Base_RevC-2xAEMvA-rme.yaml b/config/FVP_Base_RevC-2xAEMvA-rme.yaml new file mode 100644 index 0000000..d228455 --- /dev/null +++ b/config/FVP_Base_RevC-2xAEMvA-rme.yaml @@ -0,0 +1,42 @@ +# Copyright (c) 2024, Arm Limited. +# SPDX-License-Identifier: MIT + +%YAML 1.2 +--- + +layers: + - FVP_Base_RevC-2xAEMvA-base.yaml + - arch/v9.2.yaml + +run: + params: + -C cluster0.rme_support_level: 2 + -C cluster1.rme_support_level: 2 + -C bp.secure_memory: 0 # Disable security checking by TZC-400 + -C bp.has_rme: 1 # Enable Realm Management Extension(RME) support + # Only Root access to Trusted ROM and SRAM. + # SECURE/ROOT access only for below peripherals: + # -Trusted DRAM + # -REFCLK CNTControl (Generic Timer) + # -Trusted Watchdog SP805, Trustzone address space controller + # -AP_REFCLK CNTBase0 (Generic Timer) + # -Trusted RNG, Non-Volatile Counter and Root-Key Storage + # -Flash0, Flash1 + # -uart0, uart1, uart2, uart3 + + # Suppress "WARNING: MPAM_NS is deprecated when RME is in use. Should use MPAM_SP" + -C cluster0.output_attributes: ExtendedID[62:55]=MPAM_PMG,ExtendedID[54:39]=MPAM_PARTID,ExtendedID[38:37]=MPAM_SP + -C cluster1.output_attributes: ExtendedID[62:55]=MPAM_PMG,ExtendedID[54:39]=MPAM_PARTID,ExtendedID[38:37]=MPAM_SP + + # CCA-specific SMMU settings. + -C pci.pci_smmuv3.mmu.SMMU_ROOT_IDR0: 3 + -C pci.pci_smmuv3.mmu.SMMU_ROOT_IIDR: 0x43B + -C pci.pci_smmuv3.mmu.root_register_page_offset: 0x20000 + + # Enable FEAT_CSV2_2, which is optional. But TFA 2.10 force-enables it when + # ENABLE_RME=1 so if it's not there we see an exception. + -C cluster0.restriction_on_speculative_execution: 2 + -C cluster1.restriction_on_speculative_execution: 2 + -C cluster0.restriction_on_speculative_execution_aarch32: 2 + -C cluster1.restriction_on_speculative_execution_aarch32: 2 + diff --git a/config/cca-3world.yaml b/config/cca-3world.yaml index ddb236e..17239e1 100644 --- a/config/cca-3world.yaml +++ b/config/cca-3world.yaml @@ -93,28 +93,12 @@ description: >- concrete: true layers: - - ns-edk2.yaml - - rmm-base.yaml + - cca-edk2.yaml - linux-base.yaml - kvmtool-base.yaml - - arch/v9.2.yaml + - kvm-unit-tests.yaml build: - tfa: - params: - ENABLE_RME: 1 - RMM: ${artifact:RMM} - FVP_HW_CONFIG: ${artifact:DTB} - - edk2: - repo: - edk2: - remote: https://git.gitlab.arm.com/linux-arm/edk2-cca.git - revision: 2802_arm_cca_rmm-v1.0-eac5 - edk2-platforms: - remote: https://git.gitlab.arm.com/linux-arm/edk2-platforms-cca.git - revision: 2802_arm_cca_rmm-v1.0-eac5 - linux: repo: remote: https://git.gitlab.arm.com/linux-arm/linux-cca.git @@ -128,26 +112,6 @@ build: remote: https://gitlab.arm.com/linux-arm/kvmtool-cca revision: cca/rmm-v1.0-eac5 - kvm-unit-tests: - repo: - remote: https://gitlab.arm.com/linux-arm/kvm-unit-tests-cca - revision: cca/rmm-v1.0-eac5 - - toolchain: aarch64-linux-gnu- - - params: - --arch: arm64 - --cross-prefix: $${CROSS_COMPILE} - --target: kvmtool - - build: - - ./configure ${param:join_equal} - - make -j${param:jobs} - - tar -caf ${param:builddir}/kvm-unit-tests.tgz -C ${param:sourcedir} . - - artifacts: - KVM_UNIT_TESTS: ${param:builddir}/kvm-unit-tests.tgz - edk2-cca-guest: repo: edk2: @@ -229,37 +193,3 @@ run: KERNEL: value: ${artifact:KERNEL} - params: - -C cluster0.rme_support_level: 2 - -C cluster1.rme_support_level: 2 - -C bp.secure_memory: 0 # Disable security checking by TZC-400 - -C bp.has_rme: 1 # Enable Realm Management Extension(RME) support - # Only Root access to Trusted ROM and SRAM. - # SECURE/ROOT access only for below peripherals: - # -Trusted DRAM - # -REFCLK CNTControl (Generic Timer) - # -Trusted Watchdog SP805, Trustzone address space controller - # -AP_REFCLK CNTBase0 (Generic Timer) - # -Trusted RNG, Non-Volatile Counter and Root-Key Storage - # -Flash0, Flash1 - # -uart0, uart1, uart2, uart3 - - # Suppress "WARNING: MPAM_NS is deprecated when RME is in use. Should use MPAM_SP" - -C cluster0.output_attributes: ExtendedID[62:55]=MPAM_PMG,ExtendedID[54:39]=MPAM_PARTID,ExtendedID[38:37]=MPAM_SP - -C cluster1.output_attributes: ExtendedID[62:55]=MPAM_PMG,ExtendedID[54:39]=MPAM_PARTID,ExtendedID[38:37]=MPAM_SP - - # CCA-specific SMMU settings. - -C pci.pci_smmuv3.mmu.SMMU_ROOT_IDR0: 3 - -C pci.pci_smmuv3.mmu.SMMU_ROOT_IIDR: 0x43B - -C pci.pci_smmuv3.mmu.root_register_page_offset: 0x20000 - - # Enable FEAT_CSV2_2, which is optional. But TFA 2.10 force-enables it when - # ENABLE_RME=1 so if it's not there we see an exception. - -C cluster0.restriction_on_speculative_execution: 2 - -C cluster1.restriction_on_speculative_execution: 2 - -C cluster0.restriction_on_speculative_execution_aarch32: 2 - -C cluster1.restriction_on_speculative_execution_aarch32: 2 - - terminals: - bp.terminal_3: - friendly: rmm diff --git a/config/cca-edk2.yaml b/config/cca-edk2.yaml new file mode 100644 index 0000000..d26df1c --- /dev/null +++ b/config/cca-edk2.yaml @@ -0,0 +1,59 @@ +# Copyright (c) 2024, Arm Limited. +# SPDX-License-Identifier: MIT + +%YAML 1.2 +--- +description: >- + Brings together TF-A, TF-RMM and EDK2 to provide a 3 world environment running + on FVP. In this config TF-A is in Root World, TF-RMM is in Realm EL2 and EDK2 + and Linux form the non-secure EL2. Allows easy specification of the kernel + image and command line, and rootfs at runtime (see rtvars). ACPI is provided + by UEFI. DT is enabled by default. Use 'acpi=force' command line option 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'. + + .. code-block:: shell + $ shrinkwrap build cca-edk2.yaml + + .. code-block:: shell + $ shrinkwrap run cca-edk2.yaml --rtvar KERNEL=path/to/Image --rtvar ROOTFS=path/to/rootfs.img + + When 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): + + .. code-block:: shell + # mkdir /share + # mount -t 9p -o trans=virtio,version=9p2000.L FM /share + +concrete: true + +layers: + - FVP_Base_RevC-2xAEMvA-rme.yaml + - tfa-rme.yaml + - ns-edk2-base.yaml + +build: + edk2: + repo: + edk2: + remote: https://git.gitlab.arm.com/linux-arm/edk2-cca.git + revision: 2802_arm_cca_rmm-v1.0-eac5 + edk2-platforms: + remote: https://git.gitlab.arm.com/linux-arm/edk2-platforms-cca.git + revision: 2802_arm_cca_rmm-v1.0-eac5 diff --git a/config/kvm-unit-tests.yaml b/config/kvm-unit-tests.yaml new file mode 100644 index 0000000..a2f2cb9 --- /dev/null +++ b/config/kvm-unit-tests.yaml @@ -0,0 +1,28 @@ +# Copyright (c) 2024, Arm Limited. +# SPDX-License-Identifier: MIT + +%YAML 1.2 +--- +description: >- + Build KVM unit tests. + +build: + kvm-unit-tests: + repo: + remote: https://gitlab.arm.com/linux-arm/kvm-unit-tests-cca + revision: cca/rmm-v1.0-eac5 + + toolchain: aarch64-linux-gnu- + + params: + --arch: arm64 + --cross-prefix: $${CROSS_COMPILE} + --target: kvmtool + + build: + - ./configure ${param:join_equal} + - make -j${param:jobs} + - tar -caf ${param:builddir}/kvm-unit-tests.tgz -C ${param:sourcedir} . + + artifacts: + KVM_UNIT_TESTS: ${param:builddir}/kvm-unit-tests.tgz diff --git a/config/ns-edk2-base.yaml b/config/ns-edk2-base.yaml new file mode 100644 index 0000000..452fcec --- /dev/null +++ b/config/ns-edk2-base.yaml @@ -0,0 +1,83 @@ +# Copyright (c) 2022, Arm Limited. +# SPDX-License-Identifier: MIT + +%YAML 1.2 +--- +description: >- + Internal building block for edk2-based systems. Requires separate layer to add + TF-A, DT and FVP (configured to suit). + +layers: + - edk2-base.yaml + +build: + tfa: + params: + BL33: ${artifact:EDK2} + +run: + rtvars: + 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 + + ROOTFS: + type: path + value: '' + + SHARE: + type: path + value: '' + + EDK2FLASH: + type: path + value: '' + + params: + -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 bp.virtiop9device.root_path: ${rtvar:SHARE} + + prerun: + # We use the FVP's and UEFI's semihosting capability to get the images into + # the system. Wrap this up as a command in the startup.nsh along with the + # command line. UEFI will execute this when entering its shell. Copy the + # images to a unique temp directory (which is the root of our semihosting + # environment) then refer to them by its base name to UEFI. Using a unique + # temp directory means we can run multiple instances in parallel. + - SEMIHOSTDIR=`mktemp -d` + - function finish { rm -rf $$SEMIHOSTDIR; } + - trap finish EXIT + - cp ${rtvar:KERNEL} $${SEMIHOSTDIR}/Image + - cp ${rtvar:DTB} $${SEMIHOSTDIR}/fdt.dtb + - cat < $${SEMIHOSTDIR}/startup.nsh + - Image dtb=fdt.dtb ${rtvar:CMDLINE} + - EOF + + terminals: + bp.terminal_0: + friendly: '' + type: stdinout + no_color: true + no_escapes: 'EFI stub: Booting Linux Kernel...' + bp.terminal_1: + friendly: edk2 diff --git a/config/ns-edk2.yaml b/config/ns-edk2.yaml index 89c644f..6634d5f 100644 --- a/config/ns-edk2.yaml +++ b/config/ns-edk2.yaml @@ -45,77 +45,5 @@ concrete: true layers: - FVP_Base_RevC-2xAEMvA-base.yaml - tfa-base.yaml - - edk2-base.yaml - dt-base.yaml - -build: - tfa: - params: - BL33: ${artifact:EDK2} - -run: - rtvars: - 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 - - ROOTFS: - type: path - value: '' - - SHARE: - type: path - value: '' - - EDK2FLASH: - type: path - value: '' - - params: - -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 bp.virtiop9device.root_path: ${rtvar:SHARE} - - prerun: - # We use the FVP's and UEFI's semihosting capability to get the images into - # the system. Wrap this up as a command in the startup.nsh along with the - # command line. UEFI will execute this when entering its shell. Copy the - # images to a unique temp directory (which is the root of our semihosting - # environment) then refer to them by its base name to UEFI. Using a unique - # temp directory means we can run multiple instances in parallel. - - SEMIHOSTDIR=`mktemp -d` - - function finish { rm -rf $$SEMIHOSTDIR; } - - trap finish EXIT - - cp ${rtvar:KERNEL} $${SEMIHOSTDIR}/Image - - cp ${rtvar:DTB} $${SEMIHOSTDIR}/fdt.dtb - - cat < $${SEMIHOSTDIR}/startup.nsh - - Image dtb=fdt.dtb ${rtvar:CMDLINE} - - EOF - - terminals: - bp.terminal_0: - friendly: '' - type: stdinout - no_color: true - no_escapes: 'EFI stub: Booting Linux Kernel...' - bp.terminal_1: - friendly: edk2 + - ns-edk2-base.yaml diff --git a/config/tfa-rme.yaml b/config/tfa-rme.yaml new file mode 100644 index 0000000..26cf405 --- /dev/null +++ b/config/tfa-rme.yaml @@ -0,0 +1,29 @@ +# Copyright (c) 2024, Arm Limited. +# SPDX-License-Identifier: MIT + +%YAML 1.2 +--- +description: >- + Layer builds TF-A, TF-RMM, along with the required device tree, configured for + RME with Armv9.2 architecture extension. This yaml file can be customized and + used as base for building higher layers. + +layers: + - FVP_Base_RevC-2xAEMvA-rme.yaml + - tfa-base.yaml + - rmm-base.yaml + - dt-base.yaml + - arch/v9.2.yaml + +build: + tfa: + params: + ENABLE_RME: 1 + RMM: ${artifact:RMM} + FVP_HW_CONFIG: ${artifact:DTB} + +run: + terminals: + bp.terminal_3: + friendly: rmm + -- GitLab From 0f5a9349ebd60a55723218408057d2c6f616b45a Mon Sep 17 00:00:00 2001 From: Ryan Roberts Date: Tue, 15 Oct 2024 16:19:18 +0100 Subject: [PATCH 2/4] docs: Add configstore rst for cca-edk2.yaml Auto-generated from the yaml. Signed-off-by: Ryan Roberts --- .../userguide/configstore/cca-edk2.rst | 65 +++++++++++++++++++ documentation/userguide/configstore/index.rst | 1 + 2 files changed, 66 insertions(+) create mode 100644 documentation/userguide/configstore/cca-edk2.rst diff --git a/documentation/userguide/configstore/cca-edk2.rst b/documentation/userguide/configstore/cca-edk2.rst new file mode 100644 index 0000000..7810e39 --- /dev/null +++ b/documentation/userguide/configstore/cca-edk2.rst @@ -0,0 +1,65 @@ +.. + # Copyright (c) 2023, Arm Limited. + # + # SPDX-License-Identifier: MIT + +############# +cca-edk2.yaml +############# + +Description +########### + +Brings together TF-A, TF-RMM and EDK2 to provide a 3 world environment running on FVP. In this config TF-A is in Root World, TF-RMM is in Realm EL2 and EDK2 and Linux form the non-secure EL2. Allows easy specification of the kernel image and command line, and rootfs at runtime (see rtvars). ACPI is provided by UEFI. DT is enabled by default. Use 'acpi=force' command line option 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'. + +.. code-block:: shell + + $ shrinkwrap build cca-edk2.yaml + + +.. code-block:: shell + + $ shrinkwrap run cca-edk2.yaml --rtvar KERNEL=path/to/Image --rtvar ROOTFS=path/to/rootfs.img + + +When 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): + +.. code-block:: shell + + # mkdir /share + # mount -t 9p -o trans=virtio,version=9p2000.L FM /share + +Concrete +######## + +True + +Build-Time Variables +#################### + +===== ======= +btvar default +===== ======= +===== ======= + +Run-Time Variables +################## + +============== =============================================================== +rtvar default +============== =============================================================== +BL1 ${artifact:BL1} +CMDLINE console=ttyAMA0 earlycon=pl011,0x1c090000 root=/dev/vda ip=dhcp +DTB ${artifact:DTB} +EDK2FLASH +FIP ${artifact:FIP} +KERNEL +LOCAL_NET_PORT 8022 +ROOTFS +SHARE +============== =============================================================== + diff --git a/documentation/userguide/configstore/index.rst b/documentation/userguide/configstore/index.rst index e428e21..6475f2b 100644 --- a/documentation/userguide/configstore/index.rst +++ b/documentation/userguide/configstore/index.rst @@ -19,6 +19,7 @@ out-of-the-box: buildroot.rst cca-3world.rst cca-4world.rst + cca-edk2.rst ffa-hafnium-optee.rst ffa-optee.rst ffa-tftf.rst -- GitLab From 766cd38542fad28ee03db3478ebacbdc85b1df2b Mon Sep 17 00:00:00 2001 From: Ryan Roberts Date: Tue, 15 Oct 2024 16:45:10 +0100 Subject: [PATCH 3/4] test: Move cca-[34]world.yaml to test.py's CONFIGS table cca-3world.yaml and cca-4world.yaml have traditionally been special cased by the test framework because they have their arch revision baked into the config and don't support overlaying different arches. However, this is totally unecessary now that we expose which arches are supported in the CONFIGS table. So let's extend that so that not specifiying any arches means "don't add an arch overlay". Then we can add them to the table with everything else. Signed-off-by: Ryan Roberts --- test/test.py | 49 +++++++++++++++++++++++++++++-------------------- 1 file changed, 29 insertions(+), 20 deletions(-) diff --git a/test/test.py b/test/test.py index e0b945b..4485b0c 100755 --- a/test/test.py +++ b/test/test.py @@ -104,6 +104,16 @@ CONFIGS = [ }, 'arch': {'start': 'v8.0', 'end': ARCH_LATEST}, }, + { + 'config': 'cca-3world.yaml', + 'btvars': {'GUEST_ROOTFS': ROOTFS}, + 'rtvars': {'default': {'KERNEL': KERNEL, 'ROOTFS': ROOTFS}}, + }, + { + 'config': 'cca-4world.yaml', + 'btvars': {'GUEST_ROOTFS': ROOTFS}, + 'rtvars': {'default': {'KERNEL': KERNEL, 'ROOTFS': ROOTFS}}, + }, ] @@ -325,31 +335,30 @@ def run_configs(configs, overlay=None, rtvarss=None): def do_main(args): + arch_configs = [c for c in CONFIGS if 'arch' in c] + noarch_configs = [c for c in CONFIGS if 'arch' not in c] + if args.smoke_test: - arches = set([c['arch']['end'] for c in CONFIGS]) + arches = set([c['arch']['end'] for c in arch_configs]) else: arches = list(arch_range('v8.0', ARCH_LATEST)) + # Configs that support an arch override. for arch in arches: - configs = [c['config'] for c in CONFIGS if arch_in_range(arch, c['arch']['end'] if args.smoke_test else c['arch']['start'], c['arch']['end'])] - btvarss = [c['btvars'] for c in CONFIGS if arch_in_range(arch, c['arch']['end'] if args.smoke_test else c['arch']['start'], c['arch']['end'])] - rtvarss = [c['rtvars'] for c in CONFIGS if arch_in_range(arch, c['arch']['end'] if args.smoke_test else c['arch']['start'], c['arch']['end'])] - if len(configs) == 0: - continue - build_configs(configs, f'arch/{arch}.yaml', btvarss=btvarss) - run_configs(configs, f'arch/{arch}.yaml', rtvarss=rtvarss) - - # Special-case configs that don't support arch overrides. - build_configs(['cca-3world.yaml', 'cca-4world.yaml'], - btvarss=[ - {'GUEST_ROOTFS': ROOTFS}, - {'GUEST_ROOTFS': ROOTFS} - ]) - run_configs(['cca-3world.yaml', 'cca-4world.yaml'], None, - rtvarss=[ - {'default': {'KERNEL': KERNEL, 'ROOTFS': ROOTFS}}, - {'default': {'KERNEL': KERNEL, 'ROOTFS': ROOTFS}}, - ]) + configs = [c['config'] for c in arch_configs if arch_in_range(arch, c['arch']['end'] if args.smoke_test else c['arch']['start'], c['arch']['end'])] + btvarss = [c['btvars'] for c in arch_configs if arch_in_range(arch, c['arch']['end'] if args.smoke_test else c['arch']['start'], c['arch']['end'])] + rtvarss = [c['rtvars'] for c in arch_configs if arch_in_range(arch, c['arch']['end'] if args.smoke_test else c['arch']['start'], c['arch']['end'])] + if len(configs) > 0: + build_configs(configs, f'arch/{arch}.yaml', btvarss=btvarss) + run_configs(configs, f'arch/{arch}.yaml', rtvarss=rtvarss) + + # Configs that don't support an arch override. + configs = [c['config'] for c in noarch_configs] + btvarss = [c['btvars'] for c in noarch_configs] + rtvarss = [c['rtvars'] for c in noarch_configs] + if len(configs) > 0: + build_configs(configs, btvarss=btvarss) + run_configs(configs, rtvarss=rtvarss) success = print_results(args.junit) exit(not success) -- GitLab From 6f18f40203f97be4e1dabe1c260a9b7d9cbe40b8 Mon Sep 17 00:00:00 2001 From: Ryan Roberts Date: Tue, 15 Oct 2024 16:50:11 +0100 Subject: [PATCH 4/4] test: Add cca-edk2.yaml to test.py's CONFIGS table Let's start testing cca-edk2.yaml on the CI to ensure it does not break. Signed-off-by: Ryan Roberts --- test/test.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/test/test.py b/test/test.py index 4485b0c..10c8613 100755 --- a/test/test.py +++ b/test/test.py @@ -114,6 +114,18 @@ CONFIGS = [ 'btvars': {'GUEST_ROOTFS': ROOTFS}, 'rtvars': {'default': {'KERNEL': KERNEL, 'ROOTFS': ROOTFS}}, }, + { + 'config': 'cca-edk2.yaml', + 'btvars': {}, + 'rtvars': { + 'dt': {'KERNEL': KERNEL, 'ROOTFS': ROOTFS}, + 'acpi': { + 'KERNEL': KERNEL, + 'ROOTFS': ROOTFS, + 'CMDLINE': '\"console=ttyAMA0 earlycon=pl011,0x1c090000 root=/dev/vda ip=dhcp acpi=force\"' + }, + }, + }, ] -- GitLab