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

Side by Side Diff: src/platform/vboot_reference/utils/kernel_image_fw.c

Issue 1585007: combined patch for: (Closed)
Patch Set: Created 10 years, 8 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 * Functions for verifying a verified boot kernel image. 5 * Functions for verifying a verified boot kernel image.
6 * (Firmware portion) 6 * (Firmware portion)
7 */ 7 */
8 8
9 #include "kernel_image_fw.h" 9 #include "kernel_image_fw.h"
10 10
11 #include "padding.h" 11 #include "cryptolib.h"
12 #include "rollback_index.h" 12 #include "rollback_index.h"
13 #include "rsa_utility.h"
14 #include "sha_utility.h"
15 #include "utility.h" 13 #include "utility.h"
16 14
17 /* Macro to determine the size of a field structure in the KernelImage 15 /* Macro to determine the size of a field structure in the KernelImage
18 * structure. */ 16 * structure. */
19 #define FIELD_LEN(field) (sizeof(((KernelImage*)0)->field)) 17 #define FIELD_LEN(field) (sizeof(((KernelImage*)0)->field))
20 #define KERNEL_CONFIG_FIELD_LEN (FIELD_LEN(kernel_version) + FIELD_LEN(options.v ersion) + \ 18 #define KERNEL_CONFIG_FIELD_LEN (FIELD_LEN(kernel_version) + FIELD_LEN(options.v ersion) + \
21 FIELD_LEN(options.cmd_line) + \ 19 FIELD_LEN(options.cmd_line) + \
22 FIELD_LEN(options.kernel_len) + \ 20 FIELD_LEN(options.kernel_len) + \
23 FIELD_LEN(options.kernel_load_addr) + \ 21 FIELD_LEN(options.kernel_load_addr) + \
24 FIELD_LEN(options.kernel_entry_addr)) 22 FIELD_LEN(options.kernel_entry_addr))
(...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after
359 /* Lock Kernel TPM rollback indices from further writes. 357 /* Lock Kernel TPM rollback indices from further writes.
360 * TODO(gauravsh): Figure out if these can be combined into one 358 * TODO(gauravsh): Figure out if these can be combined into one
361 * 32-bit location since we seem to always use them together. This can help 359 * 32-bit location since we seem to always use them together. This can help
362 * us minimize the number of NVRAM writes/locks (which are limited over flash 360 * us minimize the number of NVRAM writes/locks (which are limited over flash
363 * memory lifetimes. 361 * memory lifetimes.
364 */ 362 */
365 LockStoredVersion(KERNEL_KEY_VERSION); 363 LockStoredVersion(KERNEL_KEY_VERSION);
366 LockStoredVersion(KERNEL_VERSION); 364 LockStoredVersion(KERNEL_VERSION);
367 return kernel_to_boot; 365 return kernel_to_boot;
368 } 366 }
OLDNEW
« no previous file with comments | « src/platform/vboot_reference/utils/kernel_image.c ('k') | src/platform/vboot_reference/utils/kernel_utility.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698