summaryrefslogtreecommitdiff
path: root/firmware/include
diff options
context:
space:
mode:
authorMattias Nissler <mnissler@chromium.org>2017-12-05 16:27:42 +0100
committerMattias Nissler <mnissler@chromium.org>2018-04-13 10:03:37 +0000
commitdc060ace1b461e09a8e0547f180377d707ff347d (patch)
treed849c2a4281ffbf77aa73f4f2edef2a197cb1ca4 /firmware/include
parentec9040c4ef51bef43e8c94c1ecd953145861d834 (diff)
downloadvboot-dc060ace1b461e09a8e0547f180377d707ff347d.tar.gz
tpm_lite: Add TlclGetSpaceInfo
The new TlclGetSpaceInfo function returns more detailed information about a defined NVRAM space. The existing TlclGetPermissions function is now using TlclGetSpaceInfo behind the scenes. BRANCH=None BUG=chromium:788719 TEST=New unit tests. Change-Id: I6c4f490d575788b696fd742a69e81e2767ec50f1 Reviewed-on: https://chromium-review.googlesource.com/937705 Trybot-Ready: Mattias Nissler <mnissler@chromium.org> Tested-by: Mattias Nissler <mnissler@chromium.org> Reviewed-by: Andrey Pronin <apronin@chromium.org>
Diffstat (limited to 'firmware/include')
-rw-r--r--firmware/include/tlcl.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/firmware/include/tlcl.h b/firmware/include/tlcl.h
index 1b08ec9c..28508c3f 100644
--- a/firmware/include/tlcl.h
+++ b/firmware/include/tlcl.h
@@ -213,6 +213,17 @@ uint32_t TlclExtend(int pcr_num, const uint8_t *in_digest, uint8_t *out_digest);
uint32_t TlclGetPermissions(uint32_t index, uint32_t *permissions);
/**
+ * Get the public information about the NVRAM space identified by |index|. All
+ * other parameters are filled in with the respective information.
+ * |auth_policy_size| is both an input an output parameter. It should contain
+ * the available buffer size in |auth_policy| and will be updated to indicate
+ * the size of the filled in auth policy upon return. If the buffer size is not
+ * sufficient, the return value will be TPM_E_BUFFER_SIZE.
+ */
+uint32_t TlclGetSpaceInfo(uint32_t index, uint32_t *attributes, uint32_t *size,
+ void* auth_policy, uint32_t* auth_policy_size);
+
+/**
* Get the entire set of permanent flags.
*/
uint32_t TlclGetPermanentFlags(TPM_PERMANENT_FLAGS *pflags);