Add a build-time assert for sizeof(OBJECT) am: 1d3ac31070 am: 458b6689d7 am: 09170b3a3c am: 12242f389d
am: 6c856e6362

Change-Id: I3c4c9e70b879f414fffc23a30ddbd7a32d3c8e8e
diff --git a/Global.h b/Global.h
index 057fa89..5b868ad 100644
--- a/Global.h
+++ b/Global.h
@@ -190,6 +190,12 @@
    TPM2B_NAME               name;                    // Name of the object name. Kept here
                                                      // to avoid repeatedly computing it.
 } OBJECT;
+#ifdef EMBEDDED_MODE
+// This build time assert serves as a rudimentary check for changes
+// to the OBJECT structure (which is serialized to NVmem).  Whenever
+// the OBJECT struct changes, NV_FORMAT_VERSION ought to be bumped.
+struct size_check { char a[sizeof(OBJECT) == 1536 ? 1 : -1]; };
+#endif
 //
 //
 //           HASH_OBJECT Structure