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 * 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 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 uint32_t RollbackKernelRecovery(int developer_mode); | 88 uint32_t RollbackKernelRecovery(int developer_mode); |
89 | 89 |
90 /* Read and write may be called if not in developer mode. If called in | 90 /* Read and write may be called if not in developer mode. If called in |
91 * recovery mode, the effect is undefined. */ | 91 * recovery mode, the effect is undefined. */ |
92 uint32_t RollbackKernelRead(uint16_t* key_version, uint16_t* version); | 92 uint32_t RollbackKernelRead(uint16_t* key_version, uint16_t* version); |
93 uint32_t RollbackKernelWrite(uint16_t key_version, uint16_t version); | 93 uint32_t RollbackKernelWrite(uint16_t key_version, uint16_t version); |
94 | 94 |
95 /* Lock must be called. Internally, it's ignored in recovery mode. */ | 95 /* Lock must be called. Internally, it's ignored in recovery mode. */ |
96 uint32_t RollbackKernelLock(void); | 96 uint32_t RollbackKernelLock(void); |
97 | 97 |
| 98 /* The following functions are here for testing only. */ |
| 99 |
| 100 /* Store 1 in *|initialized| if the TPM NVRAM spaces have been initialized, 0 |
| 101 * otherwise. Return TPM errors. */ |
| 102 uint32_t GetSpacesInitialized(int* initialized); |
| 103 |
| 104 /* Issue a TPM_Clear and reenable/reactivate the TPM. */ |
| 105 uint32_t TPMClearAndReenable(void); |
| 106 |
98 #endif /* VBOOT_REFERENCE_ROLLBACK_INDEX_H_ */ | 107 #endif /* VBOOT_REFERENCE_ROLLBACK_INDEX_H_ */ |
OLD | NEW |