blob: ad57f562ac1dab589730d13eff1482bc34f57082 [file] [log] [blame]
Fathi Boudra422bf772019-12-02 11:10:16 +02001#
Zelalemfd529af2020-08-04 15:09:53 -05002# Copyright (c) 2019-2020, Arm Limited. All rights reserved.
Fathi Boudra422bf772019-12-02 11:10:16 +02003#
4# SPDX-License-Identifier: BSD-3-Clause
5#
Zelalemfd529af2020-08-04 15:09:53 -05006# Script to interact with AArch32 Trusted Firmware-A.
Fathi Boudra422bf772019-12-02 11:10:16 +02007#
8# This script is not standalone and should be sourced by a top expect script.
9#
10
Zelalemfd529af2020-08-04 15:09:53 -050011# 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 Boudra422bf772019-12-02 11:10:16 +020014if {![info exists ::env(skip_early_boot_msgs)]} {
15 expect_string "Booting Trusted Firmware"
Zelalemfd529af2020-08-04 15:09:53 -050016
17 expect {
Chris Kay78ea2c32022-11-15 12:24:24 +000018 "BL1: Booting BL2" { message "BL2 booting" }
Zelalemfd529af2020-08-04 15:09:53 -050019
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 Kay78ea2c32022-11-15 12:24:24 +000025 message "BL2 loading error"
Zelalemfd529af2020-08-04 15:09:53 -050026 exit_uart -1
27 }
28 }
29
Fathi Boudra422bf772019-12-02 11:10:16 +020030 expect_string "BL1: Booting BL32"
Fathi Boudra422bf772019-12-02 11:10:16 +020031} else {
Chris Kay78ea2c32022-11-15 12:24:24 +000032 message "Skipping early boot messages from BL1 and BL2"
Fathi Boudra422bf772019-12-02 11:10:16 +020033}
Zelalemfd529af2020-08-04 15:09:53 -050034
Chris Kay78ea2c32022-11-15 12:24:24 +000035expect_string "SP_MIN:" "SP_MIN is booting"