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 29 matching lines...) Expand all Loading... |
40 #define KERNEL_SPACE_SIZE (sizeof(uint32_t) + KERNEL_SPACE_UID_SIZE) | 40 #define KERNEL_SPACE_SIZE (sizeof(uint32_t) + KERNEL_SPACE_UID_SIZE) |
41 | 41 |
42 /* All functions return TPM_SUCCESS (zero) if successful, non-zero if error */ | 42 /* All functions return TPM_SUCCESS (zero) if successful, non-zero if error */ |
43 | 43 |
44 /* SetupTPM is called on boot and on starting the RW firmware, passing the | 44 /* SetupTPM is called on boot and on starting the RW firmware, passing the |
45 * appripriate MODE and DEVELOPER_FLAG parameters. MODE can be one of | 45 * appripriate MODE and DEVELOPER_FLAG parameters. MODE can be one of |
46 * RO_RECOVERY_MODE, RO_NORMAL_MODE, RW_NORMAL_MODE. DEVELOPER_FLAG is 1 when | 46 * RO_RECOVERY_MODE, RO_NORMAL_MODE, RW_NORMAL_MODE. DEVELOPER_FLAG is 1 when |
47 * the developer switch is ON, 0 otherwise. | 47 * the developer switch is ON, 0 otherwise. |
48 * | 48 * |
49 * If SetupTPM returns TPM_SUCCESS, the caller may proceed. If it returns | 49 * If SetupTPM returns TPM_SUCCESS, the caller may proceed. If it returns |
50 * TPM_E_MUST_REBOOT, the caller must reboot in normal mode. For all other | 50 * TPM_E_MUST_REBOOT, the caller must reboot in the current mode. For all |
51 * return values, the caller must reboot in recovery mode. | 51 * other return values, the caller must reboot in recovery mode. |
52 * | 52 * |
53 * This function has many side effects on the TPM state. In particular, when | 53 * This function has many side effects on the TPM state. In particular, when |
54 * called with mode = RECOVERY_MODE it locks the firmware versions before | 54 * called with mode = RECOVERY_MODE, it locks the firmware versions before |
55 * returning. In all other cases, the caller is responsible for locking the | 55 * returning. In all other cases, the caller is responsible for locking the |
56 * firmware versions once it decides it doesn't need to update them. | 56 * firmware versions once it decides it doesn't need to update them. |
57 */ | 57 */ |
58 uint32_t SetupTPM(int mode, int developer_flag); | 58 uint32_t SetupTPM(int mode, int developer_flag); |
59 uint32_t GetStoredVersions(int type, uint16_t* key_version, uint16_t* version); | 59 uint32_t GetStoredVersions(int type, uint16_t* key_version, uint16_t* version); |
60 uint32_t WriteStoredVersions(int type, uint16_t key_version, uint16_t version); | 60 uint32_t WriteStoredVersions(int type, uint16_t key_version, uint16_t version); |
61 uint32_t LockFirmwareVersions(void); | 61 uint32_t LockFirmwareVersions(void); |
62 uint32_t LockKernelVersionsByLockingPP(void); | 62 uint32_t LockKernelVersionsByLockingPP(void); |
63 | 63 |
64 #endif /* VBOOT_REFERENCE_ROLLBACK_INDEX_H_ */ | 64 #endif /* VBOOT_REFERENCE_ROLLBACK_INDEX_H_ */ |
OLD | NEW |