blob: d19d7e73656503b96f141d19bb8bf9a775240e82 [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 AArch64 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
11# Initial boot message won't be present if we're starting at BL31. Skip waiting
Zelalemfd529af2020-08-04 15:09:53 -050012# for them by inspecting the environment variable 'skip_early_boot_msgs'.
Fathi Boudra422bf772019-12-02 11:10:16 +020013if {![info exists ::env(skip_early_boot_msgs)]} {
14 expect_string "Booting Trusted Firmware"
Zelalemfd529af2020-08-04 15:09:53 -050015
16 expect {
Chris Kayc4f00722022-11-15 12:24:24 +000017 "BL1: Booting BL2" { message "BL2 booting" }
Zelalemfd529af2020-08-04 15:09:53 -050018
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 Kayc4f00722022-11-15 12:24:24 +000024 message "BL2 loading error"
Zelalemfd529af2020-08-04 15:09:53 -050025 exit_uart -1
26 }
27 }
28
29 expect_string "BL1: Booting BL31"
Fathi Boudra422bf772019-12-02 11:10:16 +020030} else {
Chris Kayc4f00722022-11-15 12:24:24 +000031 message "Skipping early boot messages from BL1 and BL2"
Fathi Boudra422bf772019-12-02 11:10:16 +020032}