blob: 7ed4479c8edfd527ee6778f9e2db6772485ce9f1 [file] [log] [blame]
Javier Almansa Sobrino98de5032020-09-17 12:47:05 +01001#
2# Copyright (c) 2020, Arm Limited. All rights reserved.
3#
4# SPDX-License-Identifier: BSD-3-Clause
5#
6# Expect script for fTPM debug logs
7#
8
9source [file join [file dirname [info script]] utils.inc]
10source [file join [file dirname [info script]] handle-arguments.inc]
11
12# File to store the event log from the ftpm service.
13set FTPM_DIGEST [get_param ftpm_digest "ftpm_event_log"]
14set event_log [open $FTPM_DIGEST w]
15
16expect -exact "Event log size"
17
18expect {
19 # Parse the event log from the debug logs and store the digests
20 # so they can be matched later with what TF-A stored on the event log.
21 -re "Digest(\\s|\\w)*:\\s(\\w{2}\\s){16}|\
22 : (\\w{2}\\s){16}|\
23 Event(\\s|\\w)*:\\s\\w+\\s" {
24 puts $event_log $expect_out(0,string)
25 exp_continue
26 }
27
28 -exact "returned value" {
29 close $event_log
30 }
31}
32
33source [file join [file dirname [info script]] uart-hold.inc]