Javier Almansa Sobrino | 98de503 | 2020-09-17 12:47:05 +0100 | [diff] [blame] | 1 | # |
| 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 | |
| 9 | source [file join [file dirname [info script]] utils.inc] |
| 10 | source [file join [file dirname [info script]] handle-arguments.inc] |
| 11 | |
| 12 | # File to store the event log from the ftpm service. |
| 13 | set FTPM_DIGEST [get_param ftpm_digest "ftpm_event_log"] |
| 14 | set event_log [open $FTPM_DIGEST w] |
| 15 | |
| 16 | expect -exact "Event log size" |
| 17 | |
| 18 | expect { |
| 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 | |
| 33 | source [file join [file dirname [info script]] uart-hold.inc] |