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 kernel image. | 5 * Data structure and API definitions for a verified boot kernel image. |
6 * (Firmware Portion) | 6 * (Firmware Portion) |
7 */ | 7 */ |
8 | 8 |
9 #ifndef VBOOT_REFERENCE_KERNEL_IMAGE_FW_H_ | 9 #ifndef VBOOT_REFERENCE_KERNEL_IMAGE_FW_H_ |
10 #define VBOOT_REFERENCE_KERNEL_IMAGE_FW_H_ | 10 #define VBOOT_REFERENCE_KERNEL_IMAGE_FW_H_ |
(...skipping 26 matching lines...) Expand all Loading... |
37 uint8_t header_checksum[SHA512_DIGEST_SIZE]; /* SHA-512 Crytographic hash of | 37 uint8_t header_checksum[SHA512_DIGEST_SIZE]; /* SHA-512 Crytographic hash of |
38 * the concatenation of the | 38 * the concatenation of the |
39 * header fields, i.e. | 39 * header fields, i.e. |
40 * [header_len, | 40 * [header_len, |
41 * firmware_sign_algorithm, | 41 * firmware_sign_algorithm, |
42 * sign_algorithm, sign_key, | 42 * sign_algorithm, sign_key, |
43 * key_version] */ | 43 * key_version] */ |
44 | 44 |
45 uint8_t* kernel_key_signature; /* Signature of the header above. */ | 45 uint8_t* kernel_key_signature; /* Signature of the header above. */ |
46 | 46 |
| 47 /* Kernel preamble */ |
47 uint16_t kernel_version; /* Kernel Version# for preventing rollbacks. */ | 48 uint16_t kernel_version; /* Kernel Version# for preventing rollbacks. */ |
48 uint64_t kernel_len; /* Length of the actual kernel image. */ | 49 uint64_t kernel_len; /* Length of the actual kernel image. */ |
| 50 uint64_t bootloader_offset; /* Offset of bootloader in kernel_data. */ |
| 51 uint64_t bootloader_size; /* Size of bootloader in bytes. */ |
49 uint8_t* config_signature; /* Signature on the concatenation of | 52 uint8_t* config_signature; /* Signature on the concatenation of |
50 * [kernel_version], [kernel_len] and | 53 * [kernel_version], [kernel_len] and |
51 * [kernel_config]. */ | 54 * [kernel_config]. */ |
52 /* The kernel signature comes first as it may allow us to parallelize | 55 /* The kernel signature comes first as it may allow us to parallelize |
53 * the kernel data fetch and RSA public key operation. | 56 * the kernel data fetch and RSA public key operation. |
54 */ | 57 */ |
55 uint8_t* kernel_signature; /* Signature on the concatenation of | 58 uint8_t* kernel_signature; /* Signature on the concatenation of |
56 * [kernel_version], [kernel_len], [kernel_config] | 59 * [kernel_version], [kernel_len], [kernel_config] |
57 * and [kernel_data]. */ | 60 * and [kernel_data]. */ |
58 /* The kernel config string is stored right before the kernel image data for | 61 /* The kernel config string is stored right before the kernel image data for |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
174 * BOOT_KERNEL_A_CONTINUE Boot from Kenrel A | 177 * BOOT_KERNEL_A_CONTINUE Boot from Kenrel A |
175 * BOOT_KERNEL_B_CONTINUE Boot from Kernel B | 178 * BOOT_KERNEL_B_CONTINUE Boot from Kernel B |
176 * BOOT_KERNEL_RECOVERY_CONTINUE Jump to recovery mode | 179 * BOOT_KERNEL_RECOVERY_CONTINUE Jump to recovery mode |
177 */ | 180 */ |
178 int VerifyKernelDriver_f(uint8_t* firmware_key_blob, | 181 int VerifyKernelDriver_f(uint8_t* firmware_key_blob, |
179 kernel_entry* kernelA, | 182 kernel_entry* kernelA, |
180 kernel_entry* kernelB, | 183 kernel_entry* kernelB, |
181 int dev_mode); | 184 int dev_mode); |
182 | 185 |
183 #endif /* VBOOT_REFERENCE_KERNEL_IMAGE_FW_H_ */ | 186 #endif /* VBOOT_REFERENCE_KERNEL_IMAGE_FW_H_ */ |
OLD | NEW |