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

Side by Side Diff: firmware/lib/include/rollback_index.h

Issue 6685075: Add TPM version checking (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/vboot_reference.git@master
Patch Set: Created 9 years, 9 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « firmware/include/vboot_struct.h ('k') | firmware/lib/rollback_index.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* Copyright (c) 2010 The Chromium OS Authors. All rights reserved. 1 /* Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
2 * Use of this source code is governed by a BSD-style license that can be 2 * Use of this source code is governed by a BSD-style license that can be
3 * found in the LICENSE file. 3 * found in the LICENSE file.
4 * 4 *
5 * Functions for querying, manipulating and locking rollback indices 5 * Functions for querying, manipulating and locking rollback indices
6 * stored in the TPM NVRAM. 6 * stored in the TPM NVRAM.
7 */ 7 */
8 8
9 #ifndef VBOOT_REFERENCE_ROLLBACK_INDEX_H_ 9 #ifndef VBOOT_REFERENCE_ROLLBACK_INDEX_H_
10 #define VBOOT_REFERENCE_ROLLBACK_INDEX_H_ 10 #define VBOOT_REFERENCE_ROLLBACK_INDEX_H_
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 * global variables. */ 87 * global variables. */
88 uint32_t RollbackS3Resume(void); 88 uint32_t RollbackS3Resume(void);
89 89
90 /* These functions are callable from LoadFirmware(). They cannot use 90 /* These functions are callable from LoadFirmware(). They cannot use
91 * global variables. */ 91 * global variables. */
92 92
93 /* Setup must be called. Pass developer_mode=nonzero if in developer 93 /* Setup must be called. Pass developer_mode=nonzero if in developer
94 * mode. */ 94 * mode. */
95 uint32_t RollbackFirmwareSetup(int developer_mode, uint32_t* version); 95 uint32_t RollbackFirmwareSetup(int developer_mode, uint32_t* version);
96 96
97 /* Read may be called to get the version. This is not necessary in
98 * the normal boot path, because RollbackFirmwareSetup() provides the
99 * same information. It may be used in the recovery path. */
100 uint32_t RollbackFirmwareRead(uint32_t* version);
101
97 /* Write may be called if the versions change */ 102 /* Write may be called if the versions change */
98 uint32_t RollbackFirmwareWrite(uint32_t version); 103 uint32_t RollbackFirmwareWrite(uint32_t version);
99 104
100 /* Lock must be called */ 105 /* Lock must be called */
101 uint32_t RollbackFirmwareLock(void); 106 uint32_t RollbackFirmwareLock(void);
102 107
103 /* These functions are callable from LoadKernel(). They may use global 108 /* These functions are callable from LoadKernel(). They may use global
104 * variables. */ 109 * variables. */
105 110
106 /* Recovery may be called. If it is, this is the first time a 111 /* Recovery may be called. If it is, this is the first time a
107 * rollback function has been called this boot, so it needs to know if 112 * rollback function has been called this boot, so it needs to know if
108 * we're in developer mode. Pass developer_mode=nonzero if in developer 113 * we're in developer mode. Pass developer_mode=nonzero if in developer
109 * mode. */ 114 * mode. */
110 uint32_t RollbackKernelRecovery(int developer_mode); 115 uint32_t RollbackKernelRecovery(int developer_mode);
111 116
112 /* Read and write may be called if not in developer mode. If called in 117 /* Read and write may be called to read and write the kernel version. */
113 * recovery mode, the effect is undefined. */
114 uint32_t RollbackKernelRead(uint32_t* version); 118 uint32_t RollbackKernelRead(uint32_t* version);
115 uint32_t RollbackKernelWrite(uint32_t version); 119 uint32_t RollbackKernelWrite(uint32_t version);
116 120
117 /* Lock must be called. Internally, it's ignored in recovery mode. */ 121 /* Lock must be called. Internally, it's ignored in recovery mode. */
118 uint32_t RollbackKernelLock(void); 122 uint32_t RollbackKernelLock(void);
119 123
120 /* The following functions are here for testing only. */ 124 /* The following functions are here for testing only. */
121 125
122 /* Issue a TPM_Clear and reenable/reactivate the TPM. */ 126 /* Issue a TPM_Clear and reenable/reactivate the TPM. */
123 uint32_t TPMClearAndReenable(void); 127 uint32_t TPMClearAndReenable(void);
124 128
125 #endif /* VBOOT_REFERENCE_ROLLBACK_INDEX_H_ */ 129 #endif /* VBOOT_REFERENCE_ROLLBACK_INDEX_H_ */
OLDNEW
« no previous file with comments | « firmware/include/vboot_struct.h ('k') | firmware/lib/rollback_index.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698