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

Side by Side Diff: firmware/include/tlcl.h

Issue 2857030: Exhaustive test for rollback code (Closed) Base URL: ssh://git@chromiumos-git/vboot_reference.git
Patch Set: Fix write count handling and improve comments. Created 10 years, 5 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
« no previous file with comments | « firmware/Makefile ('k') | firmware/lib/include/rollback_index.h » ('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 5
6 /* TPM Lightweight Command Library. 6 /* TPM Lightweight Command Library.
7 * 7 *
8 * A low-level library for interfacing to TPM hardware or an emulator. 8 * A low-level library for interfacing to TPM hardware or an emulator.
9 */ 9 */
10 10
(...skipping 12 matching lines...) Expand all
23 23
24 #ifndef TPM_LITE_TLCL_H_ 24 #ifndef TPM_LITE_TLCL_H_
25 #define TPM_LITE_TLCL_H_ 25 #define TPM_LITE_TLCL_H_
26 26
27 #include "sysincludes.h" 27 #include "sysincludes.h"
28 28
29 /* Call this first. 29 /* Call this first.
30 */ 30 */
31 void TlclLibInit(void); 31 void TlclLibInit(void);
32 32
33 /* Close and open the device. This is needed for running more complex commands
34 * at user level, such as TPM_TakeOwnership, since the TPM device can be opened
35 * only by one process at a time.
36 */
37 void TlclCloseDevice(void);
38 void TlclOpenDevice(void);
39
33 /* Sends a TPM_Startup(ST_CLEAR). Note that this is a no-op for the emulator, 40 /* Sends a TPM_Startup(ST_CLEAR). Note that this is a no-op for the emulator,
34 * because it runs this command during initialization. The TPM error code is 41 * because it runs this command during initialization. The TPM error code is
35 * returned (0 for success). 42 * returned (0 for success).
36 */ 43 */
37 uint32_t TlclStartup(void); 44 uint32_t TlclStartup(void);
38 45
39 /* Run the self test. Note---this is synchronous. To run this in parallel 46 /* Run the self test. Note---this is synchronous. To run this in parallel
40 * with other firmware, use ContinueSelfTest. The TPM error code is returned. 47 * with other firmware, use ContinueSelfTest. The TPM error code is returned.
41 */ 48 */
42 uint32_t TlclSelftestfull(void); 49 uint32_t TlclSelftestfull(void);
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 uint32_t TlclSetNvLocked(void); 89 uint32_t TlclSetNvLocked(void);
83 90
84 /* Returns 1 if the TPM is owned, 0 otherwise. 91 /* Returns 1 if the TPM is owned, 0 otherwise.
85 */ 92 */
86 int TlclIsOwned(void); 93 int TlclIsOwned(void);
87 94
88 /* Issues a ForceClear. The TPM error code is returned. 95 /* Issues a ForceClear. The TPM error code is returned.
89 */ 96 */
90 uint32_t TlclForceClear(void); 97 uint32_t TlclForceClear(void);
91 98
92 /* Issues a SetEnable. The TPM error code is returned. 99 /* Issues a PhysicalEnable. The TPM error code is returned.
93 */ 100 */
94 uint32_t TlclSetEnable(void); 101 uint32_t TlclSetEnable(void);
95 102
103 /* Issues a PhysicalDisable. The TPM error code is returned.
104 */
105 uint32_t TlclClearEnable(void);
106
96 /* Issues a SetDeactivated. Pass 0 to activate. Returns result code. 107 /* Issues a SetDeactivated. Pass 0 to activate. Returns result code.
97 */ 108 */
98 uint32_t TlclSetDeactivated(uint8_t flag); 109 uint32_t TlclSetDeactivated(uint8_t flag);
99 110
100 /* Gets flags of interest. (Add more here as needed.) The TPM error code is 111 /* Gets flags of interest. (Add more here as needed.) The TPM error code is
101 * returned. 112 * returned.
102 */ 113 */
103 uint32_t TlclGetFlags(uint8_t* disable, uint8_t* deactivated); 114 uint32_t TlclGetFlags(uint8_t* disable, uint8_t* deactivated);
104 115
105 /* Sets the bGlobalLock flag, which only a reboot can clear. The TPM error 116 /* Sets the bGlobalLock flag, which only a reboot can clear. The TPM error
106 * code is returned. 117 * code is returned.
107 */ 118 */
108 uint32_t TlclSetGlobalLock(void); 119 uint32_t TlclSetGlobalLock(void);
109 120
110 /* Gets the permission bits for the NVRAM space with |index|. 121 /* Gets the permission bits for the NVRAM space with |index|.
111 */ 122 */
112 uint32_t TlclGetPermissions(uint32_t index, uint32_t* permissions); 123 uint32_t TlclGetPermissions(uint32_t index, uint32_t* permissions);
113 124
114 #endif /* TPM_LITE_TLCL_H_ */ 125 #endif /* TPM_LITE_TLCL_H_ */
OLDNEW
« no previous file with comments | « firmware/Makefile ('k') | firmware/lib/include/rollback_index.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698