| 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 30 matching lines...) Expand all Loading... |
| 41 * from the backup copy. */ | 41 * from the backup copy. */ |
| 42 #define FLAG_KERNEL_SPACE_USE_BACKUP 0x02 | 42 #define FLAG_KERNEL_SPACE_USE_BACKUP 0x02 |
| 43 | 43 |
| 44 #define ROLLBACK_SPACE_FIRMWARE_VERSION 1 | 44 #define ROLLBACK_SPACE_FIRMWARE_VERSION 1 |
| 45 /* Firmware space - FIRMWARE_NV_INDEX, locked with global lock. */ | 45 /* Firmware space - FIRMWARE_NV_INDEX, locked with global lock. */ |
| 46 typedef struct RollbackSpaceFirmware { | 46 typedef struct RollbackSpaceFirmware { |
| 47 uint8_t struct_version; /* Struct version, for backwards compatibility */ | 47 uint8_t struct_version; /* Struct version, for backwards compatibility */ |
| 48 uint8_t flags; /* Flags (see FLAG_* above) */ | 48 uint8_t flags; /* Flags (see FLAG_* above) */ |
| 49 uint32_t fw_versions; /* Firmware versions */ | 49 uint32_t fw_versions; /* Firmware versions */ |
| 50 uint32_t reserved; /* Reserved for future expansion */ | 50 uint32_t reserved; /* Reserved for future expansion */ |
| 51 RollbackSpaceKernel kernel_backup; /* Backup of kernel space */ | |
| 52 } __attribute__((packed)) RollbackSpaceFirmware; | 51 } __attribute__((packed)) RollbackSpaceFirmware; |
| 53 | 52 |
| 54 __pragma(pack(pop)) /* Support packing for MSVC. */ | 53 __pragma(pack(pop)) /* Support packing for MSVC. */ |
| 55 | 54 |
| 56 | 55 |
| 57 /* All functions return TPM_SUCCESS (zero) if successful, non-zero if error */ | 56 /* All functions return TPM_SUCCESS (zero) if successful, non-zero if error */ |
| 58 | 57 |
| 59 /* | 58 /* |
| 60 | 59 |
| 61 Call from LoadFirmware() | 60 Call from LoadFirmware() |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 | 112 |
| 114 /* Lock must be called. Internally, it's ignored in recovery mode. */ | 113 /* Lock must be called. Internally, it's ignored in recovery mode. */ |
| 115 uint32_t RollbackKernelLock(void); | 114 uint32_t RollbackKernelLock(void); |
| 116 | 115 |
| 117 /* The following functions are here for testing only. */ | 116 /* The following functions are here for testing only. */ |
| 118 | 117 |
| 119 /* Issue a TPM_Clear and reenable/reactivate the TPM. */ | 118 /* Issue a TPM_Clear and reenable/reactivate the TPM. */ |
| 120 uint32_t TPMClearAndReenable(void); | 119 uint32_t TPMClearAndReenable(void); |
| 121 | 120 |
| 122 #endif /* VBOOT_REFERENCE_ROLLBACK_INDEX_H_ */ | 121 #endif /* VBOOT_REFERENCE_ROLLBACK_INDEX_H_ */ |
| OLD | NEW |