Fathi Boudra | 422bf77 | 2019-12-02 11:10:16 +0200 | [diff] [blame] | 1 | # |
Zelalem | fd529af | 2020-08-04 15:09:53 -0500 | [diff] [blame] | 2 | # Copyright (c) 2019-2020, Arm Limited. All rights reserved. |
Fathi Boudra | 422bf77 | 2019-12-02 11:10:16 +0200 | [diff] [blame] | 3 | # |
| 4 | # SPDX-License-Identifier: BSD-3-Clause |
| 5 | # |
Zelalem | fd529af | 2020-08-04 15:09:53 -0500 | [diff] [blame] | 6 | # Script to interact with AArch64 Trusted Firmware-A. |
Fathi Boudra | 422bf77 | 2019-12-02 11:10:16 +0200 | [diff] [blame] | 7 | # |
| 8 | # This script is not standalone and should be sourced by a top expect script. |
| 9 | # |
| 10 | |
| 11 | # Initial boot message won't be present if we're starting at BL31. Skip waiting |
Zelalem | fd529af | 2020-08-04 15:09:53 -0500 | [diff] [blame] | 12 | # for them by inspecting the environment variable 'skip_early_boot_msgs'. |
Fathi Boudra | 422bf77 | 2019-12-02 11:10:16 +0200 | [diff] [blame] | 13 | if {![info exists ::env(skip_early_boot_msgs)]} { |
| 14 | expect_string "Booting Trusted Firmware" |
Zelalem | fd529af | 2020-08-04 15:09:53 -0500 | [diff] [blame] | 15 | |
| 16 | expect { |
Chris Kay | c4f0072 | 2022-11-15 12:24:24 +0000 | [diff] [blame] | 17 | "BL1: Booting BL2" { message "BL2 booting" } |
Zelalem | fd529af | 2020-08-04 15:09:53 -0500 | [diff] [blame] | 18 | |
| 19 | # Catch all 3 possible BL2 loading error messages, namely: |
| 20 | # "Failure in pre image load handling of BL2" |
| 21 | # "Failed to load BL2 firmware." |
| 22 | # "Failure in post image load handling of BL2" |
| 23 | -re "Fail.*load.*BL2" { |
Chris Kay | c4f0072 | 2022-11-15 12:24:24 +0000 | [diff] [blame] | 24 | message "BL2 loading error" |
Zelalem | fd529af | 2020-08-04 15:09:53 -0500 | [diff] [blame] | 25 | exit_uart -1 |
| 26 | } |
| 27 | } |
| 28 | |
| 29 | expect_string "BL1: Booting BL31" |
Fathi Boudra | 422bf77 | 2019-12-02 11:10:16 +0200 | [diff] [blame] | 30 | } else { |
Chris Kay | c4f0072 | 2022-11-15 12:24:24 +0000 | [diff] [blame] | 31 | message "Skipping early boot messages from BL1 and BL2" |
Fathi Boudra | 422bf77 | 2019-12-02 11:10:16 +0200 | [diff] [blame] | 32 | } |