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 AArch32 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 | |
Zelalem | fd529af | 2020-08-04 15:09:53 -0500 | [diff] [blame] | 11 | # Initial boot message won't be present if we're starting at SP_MIN. Skip |
| 12 | # waiting for them by inspecting the environment variable |
| 13 | # 'skip_early_boot_msgs'. |
Fathi Boudra | 422bf77 | 2019-12-02 11:10:16 +0200 | [diff] [blame] | 14 | if {![info exists ::env(skip_early_boot_msgs)]} { |
| 15 | expect_string "Booting Trusted Firmware" |
Zelalem | fd529af | 2020-08-04 15:09:53 -0500 | [diff] [blame] | 16 | |
| 17 | expect { |
Chris Kay | c4f0072 | 2022-11-15 12:24:24 +0000 | [diff] [blame] | 18 | "BL1: Booting BL2" { message "BL2 booting" } |
Zelalem | fd529af | 2020-08-04 15:09:53 -0500 | [diff] [blame] | 19 | |
| 20 | # Catch all 3 possible BL2 loading error messages, namely: |
| 21 | # "Failure in pre image load handling of BL2" |
| 22 | # "Failed to load BL2 firmware." |
| 23 | # "Failure in post image load handling of BL2" |
| 24 | -re "Fail.*load.*BL2" { |
Chris Kay | c4f0072 | 2022-11-15 12:24:24 +0000 | [diff] [blame] | 25 | message "BL2 loading error" |
Zelalem | fd529af | 2020-08-04 15:09:53 -0500 | [diff] [blame] | 26 | exit_uart -1 |
| 27 | } |
| 28 | } |
| 29 | |
Fathi Boudra | 422bf77 | 2019-12-02 11:10:16 +0200 | [diff] [blame] | 30 | expect_string "BL1: Booting BL32" |
Fathi Boudra | 422bf77 | 2019-12-02 11:10:16 +0200 | [diff] [blame] | 31 | } else { |
Chris Kay | c4f0072 | 2022-11-15 12:24:24 +0000 | [diff] [blame] | 32 | message "Skipping early boot messages from BL1 and BL2" |
Fathi Boudra | 422bf77 | 2019-12-02 11:10:16 +0200 | [diff] [blame] | 33 | } |
Zelalem | fd529af | 2020-08-04 15:09:53 -0500 | [diff] [blame] | 34 | |
Chris Kay | c4f0072 | 2022-11-15 12:24:24 +0000 | [diff] [blame] | 35 | expect_string "SP_MIN:" "SP_MIN is booting" |