summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoel Kitching <kitching@google.com>2019-12-09 16:25:54 +0800
committerCommit Bot <commit-bot@chromium.org>2019-12-12 10:33:54 +0000
commit0e934808068d2bce1d85419a5ae30c43eea68858 (patch)
tree3790c318bed12f47ad49c96f818a2d6b9caf09b5
parent5a4c4776f0fcd9ecd2e5075522b383470f4c49ba (diff)
downloadvboot-0e934808068d2bce1d85419a5ae30c43eea68858.tar.gz
vboot/tpm2_lite: add FIRMWARE_NV_INDEX definition
Add a FIRMWARE_NV_INDEX definition, and stop including the secdata_tpm.h header, which will soon be embarking on a new journey in depthcharge. It would be nice if we could avoid our TPM library knowing about specific space indices used by vboot. Leaving that as something to worry about in the future: chromium:1032930. BUG=b:124141368, chromium:972956, chromium:1032930 TEST=make clean && make runtests BRANCH=none Change-Id: I99bb04bbc2f4eef28cbe51ecf506078583238074 Signed-off-by: Joel Kitching <kitching@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/1958068 Tested-by: Joel Kitching <kitching@chromium.org> Auto-Submit: Joel Kitching <kitching@chromium.org> Reviewed-by: Julius Werner <jwerner@chromium.org> Commit-Queue: Joel Kitching <kitching@chromium.org>
-rw-r--r--firmware/lib/tpm2_lite/tlcl.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/firmware/lib/tpm2_lite/tlcl.c b/firmware/lib/tpm2_lite/tlcl.c
index 1ac18c2d..dca8facc 100644
--- a/firmware/lib/tpm2_lite/tlcl.c
+++ b/firmware/lib/tpm2_lite/tlcl.c
@@ -8,11 +8,19 @@
#include "2common.h"
#include "2sysincludes.h"
-#include "secdata_tpm.h"
#include "tlcl.h"
#include "tpm2_marshaling.h"
#include "utility.h"
+/*
+ * TODO(chromium:1032930): Originally accessed by including secdata_tpm.h.
+ * This file moved to depthcharge, and vboot shouldn't need to know the indices
+ * of different TPM spaces anyways. But since the vboot TPM 2.0 implementation
+ * uses TPM 1.2 primitives as its API, TlclSetGlobalLock (TPM 1.2) needs to use
+ * the firmware space index to emulate a TlclWriteLock call (TPM 2.0).
+ */
+#define FIRMWARE_NV_INDEX 0x1007
+
/* Global buffer for deserialized responses. */
struct tpm2_response tpm2_resp;