Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(105)

Side by Side Diff: src/platform/vboot_reference/include/kernel_image.h

Issue 1519008: VBoot Reference: 18 Exabytes ought to be enough for everybody (Closed)
Patch Set: Use symbolic constants. Created 10 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 */ 6 */
7 7
8 #ifndef VBOOT_REFERENCE_KERNEL_IMAGE_H_ 8 #ifndef VBOOT_REFERENCE_KERNEL_IMAGE_H_
9 #define VBOOT_REFERENCE_KERNEL_IMAGE_H_ 9 #define VBOOT_REFERENCE_KERNEL_IMAGE_H_
10 10
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 /* Checks the kernel config (analogous to preamble for firmware) signature on 156 /* Checks the kernel config (analogous to preamble for firmware) signature on
157 * kernel config pointed by [kernel_config_blob] using the signing key 157 * kernel config pointed by [kernel_config_blob] using the signing key
158 * [kernel_sign_key]. 158 * [kernel_sign_key].
159 * 159 *
160 * On success, put kernel length into [kernel_len], and return 0. 160 * On success, put kernel length into [kernel_len], and return 0.
161 * Else, return error code on failure. 161 * Else, return error code on failure.
162 */ 162 */
163 int VerifyKernelConfig(RSAPublicKey* kernel_sign_key, 163 int VerifyKernelConfig(RSAPublicKey* kernel_sign_key,
164 const uint8_t* kernel_config_blob, 164 const uint8_t* kernel_config_blob,
165 int algorithm, 165 int algorithm,
166 int* kernel_len); 166 uint64_t* kernel_len);
167 167
168 /* Checks the signature on the kernel data at location [kernel_data_start]. 168 /* Checks the signature on the kernel data at location [kernel_data_start].
169 * The length of the actual kernel data is kernel _len and it is assumed to 169 * The length of the actual kernel data is kernel _len and it is assumed to
170 * be prepended with the signature whose size depends on the signature_algorithm 170 * be prepended with the signature whose size depends on the signature_algorithm
171 * [algorithm]. 171 * [algorithm].
172 * 172 *
173 * Return 0 on success, error code on failure. 173 * Return 0 on success, error code on failure.
174 */ 174 */
175 int VerifyKernelData(RSAPublicKey* kernel_sign_key, 175 int VerifyKernelData(RSAPublicKey* kernel_sign_key,
176 const uint8_t* kernel_config_start, 176 const uint8_t* kernel_config_start,
177 const uint8_t* kernel_data_start, 177 const uint8_t* kernel_data_start,
178 int kernel_len, 178 uint64_t kernel_len,
179 int algorithm); 179 int algorithm);
180 180
181 /* Performs a chained verify of the kernel blob [kernel_blob]. If 181 /* Performs a chained verify of the kernel blob [kernel_blob]. If
182 * [dev_mode] is 0 [inactive], then the pre-processed public signing key 182 * [dev_mode] is 0 [inactive], then the pre-processed public signing key
183 * [root_key_blob] is used to verify the signature of the signing key, 183 * [root_key_blob] is used to verify the signature of the signing key,
184 * else the check is skipped. 184 * else the check is skipped.
185 * 185 *
186 * TODO(gauravsh): Does the dev mode only effect the R/W firmware verification, 186 * TODO(gauravsh): Does the dev mode only effect the R/W firmware verification,
187 * or kernel verification, or both? 187 * or kernel verification, or both?
188 * 188 *
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
261 * BOOT_KERNEL_A_CONTINUE Boot from Kenrel A 261 * BOOT_KERNEL_A_CONTINUE Boot from Kenrel A
262 * BOOT_KERNEL_B_CONTINUE Boot from Kernel B 262 * BOOT_KERNEL_B_CONTINUE Boot from Kernel B
263 * BOOT_KERNEL_RECOVERY_CONTINUE Jump to recovery mode 263 * BOOT_KERNEL_RECOVERY_CONTINUE Jump to recovery mode
264 */ 264 */
265 int VerifyKernelDriver_f(uint8_t* firmware_key_blob, 265 int VerifyKernelDriver_f(uint8_t* firmware_key_blob,
266 kernel_entry* kernelA, 266 kernel_entry* kernelA,
267 kernel_entry* kernelB, 267 kernel_entry* kernelB,
268 int dev_mode); 268 int dev_mode);
269 269
270 #endif /* VBOOT_REFERENCE_KERNEL_IMAGE_H_ */ 270 #endif /* VBOOT_REFERENCE_KERNEL_IMAGE_H_ */
OLDNEW
« no previous file with comments | « src/platform/vboot_reference/include/firmware_image.h ('k') | src/platform/vboot_reference/include/rsa_utility.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698