Skip to contentSkip to conversation

vTPM/TPM2: Add global data in vtpm_globals{}

PATCH Superseded Quan Xu 1 participant 1 message Dec 14, 2014

v1 of 4 Superseded Latest is v4 →

lore
Share & tools
lore

Quan Xu

author
#0 lore raw

PATCH 3/12 vTPM/TPM2: Add global data in vtpm_globals{}

These data is for the Mini-os to access TPM 2.0 hardware.

---
 stubdom/vtpmmgr/vtpmmgr.h | 9 +++++++++
 1 file changed, 9 insertions(+)
stubdom/vtpmmgr/vtpmmgr.h +9 -0
index 2d9d153..0d0c604 100644
@@ -44,6 +44,7 @@
 #include "uuid.h"
 #include "tcg.h"
 #include "vtpm_manager.h"
+#include "tpm2_types.h"
 
 #define RSA_KEY_SIZE 0x0800
 #define RSA_CIPHER_SIZE (RSA_KEY_SIZE / 8)
@@ -59,6 +60,14 @@ struct vtpm_globals {
    ctr_drbg_context    ctr_drbg;
 
    int hw_locality;
+
+    /* TPM 2.0 */
+    TPM_AuthArea       pw_auth;
+    TPM_AuthArea       srk_auth_area;
+    TPM_HANDLE         srk_handle;
+    TPM_HANDLE         sk_handle;
+    TPM2B_NAME         sk_name;
+    TPM2_RSA_KEY       tpm2_storage_key;
 };
 
 struct tpm_opaque {
Signature · 1 line
1.8.3.2