| 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 |
| 11 /* FIXME(gauravsh): | 11 /* FIXME(gauravsh): |
| 12 * NOTE: This file is copied over from | 12 * NOTE: This file is copied over from |
| 13 * src/platform/tpm_lite/src/tlcl/tlcl.h | 13 * src/platform/tpm_lite/src/tlcl/tlcl.h |
| 14 * Ideally, we want to directly include it without having two maintain | 14 * Ideally, we want to directly include it without having two maintain |
| 15 * duplicate copies in sync. But in the current model, this is hard | 15 * duplicate copies in sync. But in the current model, this is hard |
| 16 * to do without breaking standalone compilation. | 16 * to do without breaking standalone compilation. |
| 17 * Eventually tpm_lite should be moved into vboot_reference. | 17 * Eventually tpm_lite should be moved into vboot_reference. |
| 18 * | 18 * |
| 19 * FURTHER NOTE: The subset of TPM error codes relevant to verified boot | 19 * FURTHER NOTE: The subset of TPM error codes relevant to verified boot |
| 20 * (TPM_SUCCESS, etc.) are in tss_constants.h. A full list of TPM error codes | 20 * (TPM_SUCCESS, etc.) are in tss_constants.h. A full list of TPM error codes |
| 21 * are in /usr/include/tss/tpm_error.h, from the trousers package. | 21 * are in /usr/include/tss/tpm_error.h, from the trousers package. |
| 22 */ | 22 */ |
| 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 <stdarg.h> | 27 #include "sysincludes.h" |
| 28 #include <stdint.h> | |
| 29 #include <stdio.h> | |
| 30 #include <stdlib.h> | |
| 31 | 28 |
| 32 /* Call this first. | 29 /* Call this first. |
| 33 */ | 30 */ |
| 34 void TlclLibInit(void); | 31 void TlclLibInit(void); |
| 35 | 32 |
| 36 /* Sends a TPM_Startup(ST_CLEAR). Note that this is a no-op for the emulator, | 33 /* Sends a TPM_Startup(ST_CLEAR). Note that this is a no-op for the emulator, |
| 37 * because it runs this command during initialization. The TPM error code is | 34 * because it runs this command during initialization. The TPM error code is |
| 38 * returned (0 for success). | 35 * returned (0 for success). |
| 39 */ | 36 */ |
| 40 uint32_t TlclStartup(void); | 37 uint32_t TlclStartup(void); |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 /* Sets the bGlobalLock flag, which only a reboot can clear. The TPM error | 105 /* Sets the bGlobalLock flag, which only a reboot can clear. The TPM error |
| 109 * code is returned. | 106 * code is returned. |
| 110 */ | 107 */ |
| 111 uint32_t TlclSetGlobalLock(void); | 108 uint32_t TlclSetGlobalLock(void); |
| 112 | 109 |
| 113 /* Gets the permission bits for the NVRAM space with |index|. | 110 /* Gets the permission bits for the NVRAM space with |index|. |
| 114 */ | 111 */ |
| 115 uint32_t TlclGetPermissions(uint32_t index, uint32_t* permissions); | 112 uint32_t TlclGetPermissions(uint32_t index, uint32_t* permissions); |
| 116 | 113 |
| 117 #endif /* TPM_LITE_TLCL_H_ */ | 114 #endif /* TPM_LITE_TLCL_H_ */ |
| OLD | NEW |