Bug fix in the expect script deployed by the fvp-aemv8a.tbb.disable_dyn_auth run fragment.
Prior to this patch, the expect script didn't watch the strings
emitted by the TFTF to the UART0 port. Hence, even when all the
tests in the TFTF test suite finished successfully, the expect
script didn't terminate the model in a clean way, rather a timeout
led to the model termination.
This patch adds a new expect script which broadly tracks two patterns
that are put to the UART0 console by the CPUs:
1. Related to the disabling of image authorization dynamically
2. Booting of BL32(TFTF image) and completion of tests
Signed-off-by: Madhukar Pappireddy <madhukar.pappireddy@arm.com>
Change-Id: I20a6bcd6a0134de064ceef6e8999f87a6c4306b3
diff --git a/expect/disable_dyn_auth.inc b/expect/disable_dyn_auth.inc
new file mode 100644
index 0000000..73e7497
--- /dev/null
+++ b/expect/disable_dyn_auth.inc
@@ -0,0 +1,35 @@
+#
+# Copyright (c) 2020, Arm Limited. All rights reserved.
+#
+# SPDX-License-Identifier: BSD-3-Clause
+#
+# Script to interact with an TF-A built with Trusted Board Boot
+#
+source [file join [file dirname [info script]] handle-arguments.inc]
+
+# This script tries to catch if dynamic authentication of images is enabled
+# during trusted board boot(BL2). The authentication is done using certificates.
+
+expect_string "BL1: Booting BL2" "BL2 booting"
+expect_string "Disabling authentication of images dynamically" "Authentication disabled dynamically"
+expect {
+ # Catch all loading of authentication certificates i.e.,
+ # TRUSTED_BOOT_FW_CERT_ID U(6)
+ # TRUSTED_KEY_CERT_ID U(7)
+ # SCP_FW_KEY_CERT_ID U(8)
+ # SOC_FW_KEY_CERT_ID U(9)
+ # TRUSTED_OS_FW_KEY_CERT_ID U(10)
+ # NON_TRUSTED_FW_KEY_CERT_ID U(11)
+ # SCP_FW_CONTENT_CERT_ID U(12)
+ # SOC_FW_CONTENT_CERT_ID U(13)
+ # TRUSTED_OS_FW_CONTENT_CERT_ID U(14)
+ # NON_TRUSTED_FW_CONTENT_CERT_ID U(15)
+
+ -re "Loading image id=(6|7|8|9|10|11|12|13|14|15) at address " {
+ puts "<<Dynamic Authentication not disabled>>"
+ exit_uart -1
+ }
+ "BL1: Booting BL31" {
+ puts "BL31 Booting"
+ }
+ }