Daniel Boulby | 5f29598 | 2023-05-17 12:03:05 +0100 | [diff] [blame] | 1 | #!/usr/bin/env bash |
| 2 | # |
Manish V Badarkhe | db92983 | 2024-01-29 19:56:01 +0000 | [diff] [blame] | 3 | # Copyright (c) 2023-2024, Arm Limited. All rights reserved. |
Daniel Boulby | 5f29598 | 2023-05-17 12:03:05 +0100 | [diff] [blame] | 4 | # |
| 5 | # SPDX-License-Identifier: BSD-3-Clause |
| 6 | # |
| 7 | |
David Vincze | d8ed562 | 2024-02-23 17:00:12 +0100 | [diff] [blame] | 8 | source "$ci_root/run_config/tc_rse_utils.sh" |
Daniel Boulby | 5f29598 | 2023-05-17 12:03:05 +0100 | [diff] [blame] | 9 | |
| 10 | post_tf_build() { |
David Vincze | b38fefa | 2024-10-28 11:56:28 +0000 | [diff] [blame] | 11 | if [ $plat_variant -eq 3 ]; then |
| 12 | # Use pre-built SCP BL2 binary |
| 13 | url="$tfa_downloads/total_compute/tc$plat_variant/scp/$scp_revision/tc$plat_variant-bl2.bin" saveas="scp_ram.bin" fetch_file |
David Vincze | d37d291 | 2024-10-16 12:03:50 +0000 | [diff] [blame] | 14 | archive_file "scp_ram.bin" |
Leo Yan | 2acb902 | 2024-07-26 17:29:32 +0100 | [diff] [blame] | 15 | build_fip BL33="$archive/tftf.bin" BL32="$archive/secure_hafnium.bin" SCP_BL2="$archive/scp_ram.bin" |
| 16 | elif [ $plat_variant -eq 4 ]; then |
| 17 | build_fip BL33="$archive/tftf.bin" BL32="$archive/secure_hafnium.bin" |
| 18 | fi |
Daniel Boulby | 5f29598 | 2023-05-17 12:03:05 +0100 | [diff] [blame] | 19 | } |
| 20 | |
| 21 | fetch_tf_resource() { |
David Vincze | d8ed562 | 2024-02-23 17:00:12 +0100 | [diff] [blame] | 22 | # RSE output is printed to UART 2 so track it. |
Manish V Badarkhe | db92983 | 2024-01-29 19:56:01 +0000 | [diff] [blame] | 23 | uart="1" port="5003" file="hold_uart.exp" track_expect |
| 24 | |
David Vincze | d8ed562 | 2024-02-23 17:00:12 +0100 | [diff] [blame] | 25 | get_rse_prov_bins |
Daniel Boulby | 5f29598 | 2023-05-17 12:03:05 +0100 | [diff] [blame] | 26 | |
| 27 | sign_image bl1.bin $ap_bl1_flash_load_addr $ap_bl1_flash_size |
| 28 | |
| 29 | update_fip |
Manish V Badarkhe | db92983 | 2024-01-29 19:56:01 +0000 | [diff] [blame] | 30 | |
| 31 | # Create GPT image |
| 32 | gen_gpt_bin $archive/host_flash_fip.bin 12582912 16 |
Daniel Boulby | 5f29598 | 2023-05-17 12:03:05 +0100 | [diff] [blame] | 33 | } |
| 34 | |
| 35 | generate_lava_job_template() { |
Manish V Badarkhe | db92983 | 2024-01-29 19:56:01 +0000 | [diff] [blame] | 36 | uart="2" port="5000" set_primary="1" file="tftf-non-primary.exp" track_expect |
| 37 | uart="3" port="5001" file="spm-cactus-sp-uart1.exp" track_expect |
Daniel Boulby | 5f29598 | 2023-05-17 12:03:05 +0100 | [diff] [blame] | 38 | |
Manish V Badarkhe | db92983 | 2024-01-29 19:56:01 +0000 | [diff] [blame] | 39 | set_uart_port "${archive:?}" 0 5002 |
| 40 | set_uart_port "${archive:?}" 1 5003 |
Daniel Boulby | 5f29598 | 2023-05-17 12:03:05 +0100 | [diff] [blame] | 41 | |
| 42 | payload_type="tftf" memory_tagging_support_level="2" gen_yaml_template |
| 43 | } |