refactor(tpm): narrow down the event log parsing window
To test measured boot on FVP platform, we've got some expect scripts
which parse the TF-A console output and capture the firmware
measurements from the TCG event log dump.
Right now, these expect scripts parse all output generated right from
platform reset up to the start of BL31 execution.
This is quite a large window of time and it unnecessarily increases
the risk of capturing a message which is unrelated to a TCG event log
measurement. In particular, this part of the regexp:
: (\\w{2}\\s){16}
is quite general and could catch hexadecimal dumps of other types of
information.
To reduce this risk, modify the expect script such that it waits to
see the beginning of the TCG event log dump (identified by the string
"TCG_EfiSpecIDEvent:") before capturing any measurement.
Do similar kinds of modifications to the TPM post-expect scripts. They
too now wait for the starting string to start capturing output. They
now also look for the ending string ("Booting BL31") to stop capturing
output, which was something the expect scripts already supported but
the post-expect scripts did not.
Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
Change-Id: I09b65cce72bfc44b48b6b1eaee583a8896133b53
3 files changed