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 * High-level firmware API for loading and verifying rewritable firmware. | 5 * High-level firmware API for loading and verifying rewritable firmware. |
6 * (Firmware Portion) | 6 * (Firmware Portion) |
7 */ | 7 */ |
8 | 8 |
9 #ifndef VBOOT_REFERENCE_LOAD_FIRMWARE_FW_H_ | 9 #ifndef VBOOT_REFERENCE_LOAD_FIRMWARE_FW_H_ |
10 #define VBOOT_REFERENCE_LOAD_FIRMWARE_FW_H_ | 10 #define VBOOT_REFERENCE_LOAD_FIRMWARE_FW_H_ |
11 | 11 |
12 #include <stdint.h> | 12 #include "sysincludes.h" |
13 | 13 |
14 /* Recommended size of kernel_sign_key_blob in bytes, for | 14 /* Recommended size of kernel_sign_key_blob in bytes, for |
15 * implementations which must preallocate a transfer buffer between | 15 * implementations which must preallocate a transfer buffer between |
16 * boot phases */ | 16 * boot phases */ |
17 #define LOAD_FIRMWARE_KEY_BLOB_REC_SIZE 2104 | 17 #define LOAD_FIRMWARE_KEY_BLOB_REC_SIZE 2104 |
18 | 18 |
19 /* Return codes for LoadFirmware() */ | 19 /* Return codes for LoadFirmware() */ |
20 #define LOAD_FIRMWARE_SUCCESS 0 /* Success */ | 20 #define LOAD_FIRMWARE_SUCCESS 0 /* Success */ |
21 #define LOAD_FIRMWARE_RECOVERY 1 /* Reboot to recovery mode */ | 21 #define LOAD_FIRMWARE_RECOVERY 1 /* Reboot to recovery mode */ |
22 | 22 |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 /* Update the data hash for the current firmware image, extending it | 77 /* Update the data hash for the current firmware image, extending it |
78 * by [size] bytes stored in [*data]. This function must only be | 78 * by [size] bytes stored in [*data]. This function must only be |
79 * called inside GetFirmwareBody(). */ | 79 * called inside GetFirmwareBody(). */ |
80 void UpdateFirmwareBodyHash(LoadFirmwareParams* params, | 80 void UpdateFirmwareBodyHash(LoadFirmwareParams* params, |
81 uint8_t* data, uint64_t size); | 81 uint8_t* data, uint64_t size); |
82 | 82 |
83 | 83 |
84 | 84 |
85 | 85 |
86 #endif /* VBOOT_REFERENCE_LOAD_FIRMWARE_FW_H_ */ | 86 #endif /* VBOOT_REFERENCE_LOAD_FIRMWARE_FW_H_ */ |
OLD | NEW |