commit | 65994903e1952a74a93485e11edfec97d556d076 | [log] [tgz] |
---|---|---|
author | Namyoon Woo <namyoon@chromium.org> | Thu Oct 31 10:38:51 2019 -0700 |
committer | Commit Bot <commit-bot@chromium.org> | Sat Dec 07 06:25:18 2019 +0000 |
tree | c3122da92089d667321aa749093271f963bbf44b | |
parent | dc6f6694681cde27a23134c58da37bada87dd9c8 [diff] |
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. BUG=b:140527213 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 ^^^^^^^^ TPM_RC_COMMAND_CODE Change-Id: I2e8d116f2f9c1d2f9e09d220ebf0b2fcd46aad02 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/tpm2/+/1893681 Tested-by: Namyoon Woo <namyoon@chromium.org> Commit-Queue: Namyoon Woo <namyoon@chromium.org> Reviewed-by: Andrey Pronin <apronin@chromium.org> Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>