| #!/usr/bin/env bash |
| # |
| # Copyright (c) 2020-2023, Arm Limited. All rights reserved. |
| # |
| # SPDX-License-Identifier: BSD-3-Clause |
| # |
| |
| pre_tftf_build() { |
| # Build Cactus and Ivy images only |
| targets="cactus ivy" set_tftf_build_targets |
| } |
| |
| post_tf_build() { |
| # |
| # To build SP packages in TF-A we need to build FIP. |
| # The resulting FIP has valid SP Packages mentioned in SP_LAYOUT_FILE |
| # but dummy BL33 and BL32. |
| # |
| local dummy_file="$(mktempfile)" |
| echo "hello world" >"$dummy_file" |
| |
| build_fip BL33="$dummy_file" BL32="$dummy_file" |
| |
| url="${tf_build_root}/${plat}/${mode}/fdts/fvp_spmc_manifest.dtb" fetch_file |
| url="${tf_build_root}/${plat}/${mode}/cactus-primary.pkg" fetch_file |
| url="${tf_build_root}/${plat}/${mode}/cactus-secondary.pkg" fetch_file |
| url="${tf_build_root}/${plat}/${mode}/cactus-tertiary.pkg" fetch_file |
| url="${tf_build_root}/${plat}/${mode}/ivy.pkg" fetch_file |
| |
| archive_file "fvp_spmc_manifest.dtb" |
| archive_file "cactus-primary.pkg" |
| archive_file "cactus-secondary.pkg" |
| archive_file "cactus-tertiary.pkg" |
| archive_file "ivy.pkg" |
| } |
| |
| fetch_tf_resource() { |
| url="$tfa_downloads/spm/07-29-2021/initrd.img" saveas="initrd.bin" fetch_file |
| url="$tfa_downloads/spm/07-29-2021/manifest.dtb" saveas="dtb.bin" fetch_file |
| |
| archive_file "initrd.bin" |
| archive_file "dtb.bin" |
| } |
| |
| generate_lava_job_template() { |
| payload_type="linux" gen_yaml_template |
| } |
| |
| generate_lava_job() { |
| local model="base-aemv8a" |
| |
| uart="0" file="spm-linux-uart0.exp" track_expect |
| |
| model="$model" \ |
| arch_version="8.5" \ |
| has_branch_target_exception="1" \ |
| has_smmuv3_params="1" \ |
| kernel_addr="0x88000000" \ |
| kernel_bin="$archive/hafnium.bin" \ |
| memory_tagging_support_level="2" \ |
| reset_to_bl31="1" \ |
| sp1_pkg="cactus-primary.pkg" \ |
| sp2_pkg="cactus-secondary.pkg" \ |
| sp3_pkg="cactus-tertiary.pkg" \ |
| sp4_pkg="ivy.pkg" \ |
| spm_bin="$archive/secure_hafnium.bin" \ |
| spmc_manifest="fvp_spmc_manifest.dtb" \ |
| gicd_are_fixed_one="1" \ |
| gicv3_ext_interrupt_range="1" \ |
| gicd_ext_ppi_count="64" \ |
| gicd_ext_spi_count="1024" \ |
| gen_model_params |
| |
| model="$model" gen_fvp_yaml |
| } |