blob: fc5af715c833d8316084083a40fd04ad875dc1c4 [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 {
17 "BL1: Booting BL2" { puts "<<BL2 booting>>" }
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" {
24 puts "<<BL2 loading error>>"
25 exit_uart -1
26 }
27 }
28
29 expect_string "BL1: Booting BL31"
Fathi Boudra422bf772019-12-02 11:10:16 +020030} else {
31 puts "<<Skipping early boot messages from BL1 and BL2>>"
32}