tpm: Write logs in TPM 2 format

Add support for the TPM 2 format of log messages.

Write the logs in the format that is appropriate for the version of
the host's TPM. For TPM 1.2 write it in the 'pcpes' structure's
format, for TPM 2 in the new TPM 2 format.

By using this method we can keep the API interface on systems with a
TPM 2 even though applications pass in the 'pcpes' structures
directly. The log will still be written in the appropriate format.

The TPM 2 log contains a TPM 1.2 type of entry of event type
EV_NO_ACTION and entry of type TCG_EfiSpeIdEventStruct as the first
entry. This is described in the EFI specification (section 5.3):

Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2 files changed
tree: cbb607cead4689be18d7438cda797acf61a18e47
  1. .gitignore
  2. COPYING
  3. COPYING.LESSER
  4. Makefile
  5. README
  6. docs/
  7. scripts/
  8. src/
  9. vgasrc/