blob: 8d309c94a91a6f4abde504dac5aef75737976866 [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 {
18 "BL1: Booting BL2" { puts "<<BL2 booting>>" }
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" {
25 puts "<<BL2 loading error>>"
26 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 {
32 puts "<<Skipping early boot messages from BL1 and BL2>>"
33}
Zelalemfd529af2020-08-04 15:09:53 -050034
35expect_string "SP_MIN:" "Booting SP_MIN"