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

Side by Side Diff: firmware/lib/vboot_kernel.c

Issue 6711045: Use VbSharedData instead of VbNvStorage for fwb_tries and kernkey_vfy (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/vboot_reference.git@master
Patch Set: Created 9 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 | Annotate | Revision Log
« no previous file with comments | « firmware/lib/vboot_firmware.c ('k') | firmware/lib/vboot_nvstorage.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* Copyright (c) 2011 The Chromium OS Authors. All rights reserved. 1 /* Copyright (c) 2011 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 loading a kernel from disk. 5 * Functions for loading a kernel from disk.
6 * (Firmware portion) 6 * (Firmware portion)
7 */ 7 */
8 8
9 #include "vboot_kernel.h" 9 #include "vboot_kernel.h"
10 10
(...skipping 633 matching lines...) Expand 10 before | Expand all | Expand 10 after
644 : VBSD_LKC_CHECK_NO_PARTITIONS); 644 : VBSD_LKC_CHECK_NO_PARTITIONS);
645 645
646 /* TODO: differentiate between finding an invalid kernel 646 /* TODO: differentiate between finding an invalid kernel
647 * (found_partitions>0) and not finding one at all. Right now we 647 * (found_partitions>0) and not finding one at all. Right now we
648 * treat them the same, and return LOAD_KERNEL_INVALID for both. */ 648 * treat them the same, and return LOAD_KERNEL_INVALID for both. */
649 retval = LOAD_KERNEL_INVALID; 649 retval = LOAD_KERNEL_INVALID;
650 } 650 }
651 651
652 LoadKernelExit: 652 LoadKernelExit:
653 653
654 /* Save whether the good partition's key block was fully verified */
655 VbNvSet(vnc, VBNV_FW_VERIFIED_KERNEL_KEY, good_partition_key_block_valid);
656
657 /* Store recovery request, if any, then tear down non-volatile storage */ 654 /* Store recovery request, if any, then tear down non-volatile storage */
658 VbNvSet(vnc, VBNV_RECOVERY_REQUEST, LOAD_KERNEL_RECOVERY == retval ? 655 VbNvSet(vnc, VBNV_RECOVERY_REQUEST, LOAD_KERNEL_RECOVERY == retval ?
659 recovery : VBNV_RECOVERY_NOT_REQUESTED); 656 recovery : VBNV_RECOVERY_NOT_REQUESTED);
660 VbNvTeardown(vnc); 657 VbNvTeardown(vnc);
661 658
662 if (shared) { 659 if (shared) {
663 if (shcall) 660 if (shcall)
664 shcall->return_code = (uint8_t)retval; 661 shcall->return_code = (uint8_t)retval;
665 662
666 /* Save whether the good partition's key block was fully verified */ 663 /* Save whether the good partition's key block was fully verified */
667 if (good_partition_key_block_valid) 664 if (good_partition_key_block_valid)
668 shared->flags |= VBSD_KERNEL_KEY_VERIFIED; 665 shared->flags |= VBSD_KERNEL_KEY_VERIFIED;
669 666
670 /* Save timer values */ 667 /* Save timer values */
671 shared->timer_load_kernel_enter = timer_enter; 668 shared->timer_load_kernel_enter = timer_enter;
672 shared->timer_load_kernel_exit = VbGetTimer(); 669 shared->timer_load_kernel_exit = VbGetTimer();
673 /* Store how much shared data we used, if any */ 670 /* Store how much shared data we used, if any */
674 params->shared_data_size = shared->data_used; 671 params->shared_data_size = shared->data_used;
675 } 672 }
676 673
677 return retval; 674 return retval;
678 } 675 }
OLDNEW
« no previous file with comments | « firmware/lib/vboot_firmware.c ('k') | firmware/lib/vboot_nvstorage.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698