tpm2: support for extended TPM commands
This patch allows tpm2 library to support non-standard
TPM command codes, which start from 0x20008001.
This patch increases the flash usage by 32 bytes.
TEST=built the cr50 image with crrev.com/c/1891523,
and tested it with trunksd from crrev.com/c/1890846.
Sent a extended command of the code 0x20008001, which is marked as
not implemented. From console output, checked that Cr50 received
0x20008001 command and processed it as TPM_RC_COMMAND_CODE error,
which means 'Unsupported command code'.
// Send an empty 0x20008001 command code.
// - A key was already loaded, and its handle is 0x8000000.
// - A session was started, and its handle is 0x0300000
$ trunks_send --raw 8001 00000012 20008001 80000000 03000000
8001 0000000A 00000143
Tested-by: Namyoon Woo <email@example.com>
Commit-Queue: Namyoon Woo <firstname.lastname@example.org>
Reviewed-by: Andrey Pronin <email@example.com>
Reviewed-by: Vadim Bendebury <firstname.lastname@example.org>
9 files changed