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 * 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 |
(...skipping 429 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
440 stored_lversion = min_lversion; /* Update stored version as it's | 440 stored_lversion = min_lversion; /* Update stored version as it's |
441 * used later. */ | 441 * used later. */ |
442 } | 442 } |
443 } | 443 } |
444 kernel_to_boot = try_kernel_which[i]; | 444 kernel_to_boot = try_kernel_which[i]; |
445 break; /* We found a valid kernel. */ | 445 break; /* We found a valid kernel. */ |
446 } | 446 } |
447 try_kernel[i]->boot_priority = 0; | 447 try_kernel[i]->boot_priority = 0; |
448 } /* for loop. */ | 448 } /* for loop. */ |
449 | 449 |
450 /* Lock Kernel TPM rollback indices from further writes. | 450 /* Lock Kernel TPM rollback indices from further writes. In this design, |
451 * TODO(gauravsh): Figure out if these can be combined into one | 451 * this is tied to locking physical presence---so (software) physical |
452 * 32-bit location since we seem to always use them together. This can help | 452 * presence cannot be asserted after this point. This is a big side effect, |
453 * us minimize the number of NVRAM writes/locks (which are limited over flash | 453 * so we want to make it clear in the function name. |
454 * memory lifetimes. | 454 * TODO(gauravsh): figure out better abstractions. |
455 */ | 455 */ |
456 LockStoredVersion(KERNEL_KEY_VERSION); | 456 LockKernelVersionsByLockingPP(); |
457 LockStoredVersion(KERNEL_VERSION); | |
458 return kernel_to_boot; | 457 return kernel_to_boot; |
459 } | 458 } |
OLD | NEW |