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() { |
| 11 | if [ ! -f "$archive/scp_ram.bin" ]; then |
Sona Mathew | 914d6b4 | 2024-04-04 18:04:48 -0500 | [diff] [blame] | 12 | url="$scp_mcp_downloads/totalcompute/tc$plat_variant/platform_variant_0/release/tc$plat_variant-bl2.bin" saveas="scp_ram.bin" fetch_file |
Daniel Boulby | 5f29598 | 2023-05-17 12:03:05 +0100 | [diff] [blame] | 13 | archive_file "scp_ram.bin" |
| 14 | fi |
| 15 | |
| 16 | build_fip BL33="$archive/tftf.bin" BL32="$archive/secure_hafnium.bin" SCP_BL2="$archive/scp_ram.bin" |
| 17 | } |
| 18 | |
| 19 | fetch_tf_resource() { |
David Vincze | d8ed562 | 2024-02-23 17:00:12 +0100 | [diff] [blame] | 20 | # RSE output is printed to UART 2 so track it. |
Manish V Badarkhe | db92983 | 2024-01-29 19:56:01 +0000 | [diff] [blame] | 21 | uart="1" port="5003" file="hold_uart.exp" track_expect |
| 22 | |
David Vincze | d8ed562 | 2024-02-23 17:00:12 +0100 | [diff] [blame] | 23 | get_rse_prov_bins |
Daniel Boulby | 5f29598 | 2023-05-17 12:03:05 +0100 | [diff] [blame] | 24 | |
| 25 | sign_image bl1.bin $ap_bl1_flash_load_addr $ap_bl1_flash_size |
| 26 | |
| 27 | update_fip |
Manish V Badarkhe | db92983 | 2024-01-29 19:56:01 +0000 | [diff] [blame] | 28 | |
| 29 | # Create GPT image |
| 30 | gen_gpt_bin $archive/host_flash_fip.bin 12582912 16 |
Daniel Boulby | 5f29598 | 2023-05-17 12:03:05 +0100 | [diff] [blame] | 31 | } |
| 32 | |
| 33 | generate_lava_job_template() { |
Manish V Badarkhe | db92983 | 2024-01-29 19:56:01 +0000 | [diff] [blame] | 34 | uart="2" port="5000" set_primary="1" file="tftf-non-primary.exp" track_expect |
| 35 | uart="3" port="5001" file="spm-cactus-sp-uart1.exp" track_expect |
Daniel Boulby | 5f29598 | 2023-05-17 12:03:05 +0100 | [diff] [blame] | 36 | |
Manish V Badarkhe | db92983 | 2024-01-29 19:56:01 +0000 | [diff] [blame] | 37 | set_uart_port "${archive:?}" 0 5002 |
| 38 | set_uart_port "${archive:?}" 1 5003 |
Daniel Boulby | 5f29598 | 2023-05-17 12:03:05 +0100 | [diff] [blame] | 39 | |
| 40 | payload_type="tftf" memory_tagging_support_level="2" gen_yaml_template |
| 41 | } |