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 * Data structure and API definitions for a verified boot firmware image. | 5 * Data structure and API definitions for a verified boot firmware image. |
6 * (Firmware Portion) | 6 * (Firmware Portion) |
7 */ | 7 */ |
8 | 8 |
9 #ifndef VBOOT_REFERENCE_FIRMWARE_IMAGE_FW_H_ | 9 #ifndef VBOOT_REFERENCE_FIRMWARE_IMAGE_FW_H_ |
10 #define VBOOT_REFERENCE_FIRMWARE_IMAGE_FW_H_ | 10 #define VBOOT_REFERENCE_FIRMWARE_IMAGE_FW_H_ |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 #define VERIFY_FIRMWARE_SUCCESS 0 | 58 #define VERIFY_FIRMWARE_SUCCESS 0 |
59 #define VERIFY_FIRMWARE_INVALID_IMAGE 1 | 59 #define VERIFY_FIRMWARE_INVALID_IMAGE 1 |
60 #define VERIFY_FIRMWARE_ROOT_SIGNATURE_FAILED 2 | 60 #define VERIFY_FIRMWARE_ROOT_SIGNATURE_FAILED 2 |
61 #define VERIFY_FIRMWARE_INVALID_ALGORITHM 3 | 61 #define VERIFY_FIRMWARE_INVALID_ALGORITHM 3 |
62 #define VERIFY_FIRMWARE_PREAMBLE_SIGNATURE_FAILED 4 | 62 #define VERIFY_FIRMWARE_PREAMBLE_SIGNATURE_FAILED 4 |
63 #define VERIFY_FIRMWARE_SIGNATURE_FAILED 5 | 63 #define VERIFY_FIRMWARE_SIGNATURE_FAILED 5 |
64 #define VERIFY_FIRMWARE_WRONG_MAGIC 6 | 64 #define VERIFY_FIRMWARE_WRONG_MAGIC 6 |
65 #define VERIFY_FIRMWARE_WRONG_HEADER_CHECKSUM 7 | 65 #define VERIFY_FIRMWARE_WRONG_HEADER_CHECKSUM 7 |
66 #define VERIFY_FIRMWARE_KEY_ROLLBACK 8 | 66 #define VERIFY_FIRMWARE_KEY_ROLLBACK 8 |
67 #define VERIFY_FIRMWARE_VERSION_ROLLBACK 9 | 67 #define VERIFY_FIRMWARE_VERSION_ROLLBACK 9 |
68 #define VERIFY_FIRMWARE_MAX 10 /* Total number of error codes. */ | 68 #define VERIFY_FIRMWARE_TPM_ERROR 10 |
| 69 #define VERIFY_FIRMWARE_MAX 11 /* Total number of error codes. */ |
69 | 70 |
70 extern char* kVerifyFirmwareErrors[VERIFY_FIRMWARE_MAX]; | 71 extern char* kVerifyFirmwareErrors[VERIFY_FIRMWARE_MAX]; |
71 | 72 |
72 /* Returns the length of the verified boot firmware preamble based on | 73 /* Returns the length of the verified boot firmware preamble based on |
73 * kernel subkey signing algorithm [algorithm]. */ | 74 * kernel subkey signing algorithm [algorithm]. */ |
74 uint64_t GetFirmwarePreambleLen(int algorithm); | 75 uint64_t GetFirmwarePreambleLen(int algorithm); |
75 | 76 |
76 /* Checks for the sanity of the firmware header pointed by [header_blob]. | 77 /* Checks for the sanity of the firmware header pointed by [header_blob]. |
77 * | 78 * |
78 * On success, put signature algorithm in [algorithm], header length | 79 * On success, put signature algorithm in [algorithm], header length |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
144 * BOOT_FIRMWARE_B_CONTINUE Boot from Firmware B | 145 * BOOT_FIRMWARE_B_CONTINUE Boot from Firmware B |
145 * BOOT_FIRMWARE_RECOVERY_CONTINUE Jump to recovery mode | 146 * BOOT_FIRMWARE_RECOVERY_CONTINUE Jump to recovery mode |
146 */ | 147 */ |
147 int VerifyFirmwareDriver_f(uint8_t* root_key_blob, | 148 int VerifyFirmwareDriver_f(uint8_t* root_key_blob, |
148 uint8_t* verification_headerA, | 149 uint8_t* verification_headerA, |
149 uint8_t* firmwareA, | 150 uint8_t* firmwareA, |
150 uint8_t* verification_headerB, | 151 uint8_t* verification_headerB, |
151 uint8_t* firmwareB); | 152 uint8_t* firmwareB); |
152 | 153 |
153 #endif /* VBOOT_REFERENCE_FIRMWARE_IMAGE_FW_H_ */ | 154 #endif /* VBOOT_REFERENCE_FIRMWARE_IMAGE_FW_H_ */ |
OLD | NEW |