summaryrefslogtreecommitdiff
path: root/firmware/linktest/main.c
diff options
context:
space:
mode:
authorMeng-Huan Yu <menghuan@google.com>2018-10-19 21:03:35 +0800
committerchrome-bot <chrome-bot@chromium.org>2018-11-01 02:17:42 -0700
commit737e34e377dfb547e64c278470a224bfcde3b97c (patch)
treef81d8d509233a74ba142ea66662e3eb9adc8e67d /firmware/linktest/main.c
parent7283689dbd93502519edf47199b203b62da46ec1 (diff)
downloadvboot-737e34e377dfb547e64c278470a224bfcde3b97c.tar.gz
tpmc: Add TlclUndefineSpace/Ex for TPM 1.2/2.0
For TPM 1.2, to undefine the space is just define a size 0 space. And all operation should be done under physical presence is set if NvLocked is set. Iirc, NvLocked is usually set before boot. For TPM 2.0, support to undefine space regardless platform hierarchy state. We will use platform authorization when TPMA_NV_PLATFORMCREATE of that space is set. Otherwise, we will try to use owner authorization with NULL password. For owner authorization with customized password is still not supported in UndefineSpace since it is also not support in DefineSpaceEx. BUG=chromium:895549 BRANCH=None TEST=vboot_reference unit test passed and added new link test for TPM 1.2. For TPM 2.0, there is no unit test, but passed manually test with tpmc in the following commit. Also passed depthcharge unit test for TPM 2.0 and TPM 1.2 board. Change-Id: I06dcc70c63a88a04d19f3b248666ff2492a1d2b0 Reviewed-on: https://chromium-review.googlesource.com/1291131 Commit-Ready: Meng-Huan Yu <menghuan@chromium.org> Tested-by: Meng-Huan Yu <menghuan@chromium.org> Reviewed-by: Andrey Pronin <apronin@chromium.org>
Diffstat (limited to 'firmware/linktest/main.c')
-rw-r--r--firmware/linktest/main.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/firmware/linktest/main.c b/firmware/linktest/main.c
index 472a03a2..8d6549ce 100644
--- a/firmware/linktest/main.c
+++ b/firmware/linktest/main.c
@@ -34,6 +34,7 @@ int main(void)
TlclSelfTestFull();
TlclContinueSelfTest();
TlclDefineSpace(0, 0, 0);
+ TlclUndefineSpace(0);
TlclWrite(0, 0, 0);
TlclRead(0, 0, 0);
TlclWriteLock(0);