Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1488)

Unified Diff: src/platform/vboot_reference/vboot_firmware/include/rollback_index.h

Issue 2344002: Add recovery mode protection to new NVRAM locking scheme. (Closed) Base URL: ssh://git@chromiumos-git/chromeos
Patch Set: typo in comment Created 10 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/platform/vboot_reference/vboot_firmware/include/rollback_index.h
diff --git a/src/platform/vboot_reference/vboot_firmware/include/rollback_index.h b/src/platform/vboot_reference/vboot_firmware/include/rollback_index.h
index 2633ab7513b4b878c8b553759c4ec82c844ea6f5..2096474d55b9dfdb7bee796d85bb8ab7b7fb97ec 100644
--- a/src/platform/vboot_reference/vboot_firmware/include/rollback_index.h
+++ b/src/platform/vboot_reference/vboot_firmware/include/rollback_index.h
@@ -17,20 +17,20 @@ extern uint16_t g_kernel_key_version;
extern uint16_t g_kernel_version;
/* Rollback version types. */
-#define FIRMWARE_KEY_VERSION 0
-#define FIRMWARE_VERSION 1
-#define KERNEL_KEY_VERSION 2
-#define KERNEL_VERSION 3
+#define FIRMWARE_VERSIONS 0
+#define KERNEL_VERSIONS 1
/* TPM NVRAM location indices. */
-#define FIRMWARE_KEY_VERSION_NV_INDEX 0x1001
-#define FIRMWARE_VERSION_NV_INDEX 0x1002
-#define KERNEL_KEY_VERSION_NV_INDEX 0x1003
-#define KERNEL_VERSION_NV_INDEX 0x1004
+#define FIRMWARE_VERSIONS_NV_INDEX 0x1001
+#define KERNEL_VERSIONS_NV_INDEX 0x1002
+#define TPM_IS_INITIALIZED_NV_INDEX 0x1003
+#define KERNEL_VERSIONS_BACKUP_NV_INDEX 0x1004
+#define KERNEL_BACKUP_IS_VALID_NV_INDEX 0x1005
+
void SetupTPM(void);
-uint16_t GetStoredVersion(int type);
-int WriteStoredVersion(int type, uint16_t version);
+void GetStoredVersions(int type, uint16_t* key_version, uint16_t* version);
+int WriteStoredVersions(int type, uint16_t key_version, uint16_t version);
void LockFirmwareVersions();
void LockKernelVersionsByLockingPP();

Powered by Google App Engine
This is Rietveld 408576698