| OLD | NEW |
| 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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 void TlclSetLogLevel(int level); | 46 void TlclSetLogLevel(int level); |
| 47 | 47 |
| 48 /* Sends a TPM_Startup(ST_CLEAR). The TPM error code is returned (0 | 48 /* Sends a TPM_Startup(ST_CLEAR). The TPM error code is returned (0 |
| 49 * for success). | 49 * for success). |
| 50 */ | 50 */ |
| 51 uint32_t TlclStartup(void); | 51 uint32_t TlclStartup(void); |
| 52 | 52 |
| 53 /* Run the self test. Note---this is synchronous. To run this in parallel | 53 /* Run the self test. Note---this is synchronous. To run this in parallel |
| 54 * with other firmware, use ContinueSelfTest. The TPM error code is returned. | 54 * with other firmware, use ContinueSelfTest. The TPM error code is returned. |
| 55 */ | 55 */ |
| 56 uint32_t TlclSelftestfull(void); | 56 uint32_t TlclSelfTestFull(void); |
| 57 | 57 |
| 58 /* Runs the self test in the background. | 58 /* Runs the self test in the background. |
| 59 */ | 59 */ |
| 60 uint32_t TlclContinueSelfTest(void); | 60 uint32_t TlclContinueSelfTest(void); |
| 61 | 61 |
| 62 /* Defines a space with permission [perm]. [index] is the index for the space, | 62 /* Defines a space with permission [perm]. [index] is the index for the space, |
| 63 * [size] the usable data size. The TPM error code is returned. | 63 * [size] the usable data size. The TPM error code is returned. |
| 64 */ | 64 */ |
| 65 uint32_t TlclDefineSpace(uint32_t index, uint32_t perm, uint32_t size); | 65 uint32_t TlclDefineSpace(uint32_t index, uint32_t perm, uint32_t size); |
| 66 | 66 |
| 67 /* Defines a space with permission [perm]. [index] is the index for the space, | |
| 68 * [size] the usable data size. Returns the TPM error code. | |
| 69 */ | |
| 70 uint32_t TlclDefineSpaceResult(uint32_t index, uint32_t perm, uint32_t size); | |
| 71 | |
| 72 /* Writes [length] bytes of [data] to space at [index]. The TPM error code is | 67 /* Writes [length] bytes of [data] to space at [index]. The TPM error code is |
| 73 * returned. | 68 * returned. |
| 74 */ | 69 */ |
| 75 uint32_t TlclWrite(uint32_t index, uint8_t *data, uint32_t length); | 70 uint32_t TlclWrite(uint32_t index, uint8_t *data, uint32_t length); |
| 76 | 71 |
| 77 /* Reads [length] bytes from space at [index] into [data]. The TPM error code | 72 /* Reads [length] bytes from space at [index] into [data]. The TPM error code |
| 78 * is returned. | 73 * is returned. |
| 79 */ | 74 */ |
| 80 uint32_t TlclRead(uint32_t index, uint8_t *data, uint32_t length); | 75 uint32_t TlclRead(uint32_t index, uint8_t *data, uint32_t length); |
| 81 | 76 |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 uint32_t TlclSetEnable(void); | 108 uint32_t TlclSetEnable(void); |
| 114 | 109 |
| 115 /* Issues a PhysicalDisable. The TPM error code is returned. | 110 /* Issues a PhysicalDisable. The TPM error code is returned. |
| 116 */ | 111 */ |
| 117 uint32_t TlclClearEnable(void); | 112 uint32_t TlclClearEnable(void); |
| 118 | 113 |
| 119 /* Issues a SetDeactivated. Pass 0 to activate. Returns result code. | 114 /* Issues a SetDeactivated. Pass 0 to activate. Returns result code. |
| 120 */ | 115 */ |
| 121 uint32_t TlclSetDeactivated(uint8_t flag); | 116 uint32_t TlclSetDeactivated(uint8_t flag); |
| 122 | 117 |
| 123 /* Gets flags of interest. (Add more here as needed.) The TPM error code is | 118 /* Gets flags of interest. Pointers for flags you aren't interested in may |
| 124 * returned. | 119 * be NULL. The TPM error code is returned. |
| 125 */ | 120 */ |
| 126 uint32_t TlclGetFlags(uint8_t* disable, uint8_t* deactivated); | 121 uint32_t TlclGetFlags(uint8_t* disable, uint8_t* deactivated, uint8_t* nvlocked)
; |
| 127 | 122 |
| 128 /* Sets the bGlobalLock flag, which only a reboot can clear. The TPM error | 123 /* Sets the bGlobalLock flag, which only a reboot can clear. The TPM error |
| 129 * code is returned. | 124 * code is returned. |
| 130 */ | 125 */ |
| 131 uint32_t TlclSetGlobalLock(void); | 126 uint32_t TlclSetGlobalLock(void); |
| 132 | 127 |
| 133 /* Performs a TPM_Extend. | 128 /* Performs a TPM_Extend. |
| 134 */ | 129 */ |
| 135 uint32_t TlclExtend(int pcr_num, uint8_t* in_digest, uint8_t* out_digest); | 130 uint32_t TlclExtend(int pcr_num, uint8_t* in_digest, uint8_t* out_digest); |
| 136 | 131 |
| 137 /* Gets the permission bits for the NVRAM space with |index|. | 132 /* Gets the permission bits for the NVRAM space with |index|. |
| 138 */ | 133 */ |
| 139 uint32_t TlclGetPermissions(uint32_t index, uint32_t* permissions); | 134 uint32_t TlclGetPermissions(uint32_t index, uint32_t* permissions); |
| 140 | 135 |
| 141 #endif /* TPM_LITE_TLCL_H_ */ | 136 #endif /* TPM_LITE_TLCL_H_ */ |
| OLD | NEW |