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

Side by Side Diff: vboot_firmware/stub/load_firmware_stub.c

Issue 2829004: More code cleanup (Closed) Base URL: ssh://gitrw.chromium.org/vboot_reference.git
Patch Set: rebase Created 10 years, 6 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
« no previous file with comments | « vboot_firmware/lib/include/vboot_struct.h ('k') | no next file » | 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) 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 * TEMPORARY stub for calling LoadFirmware() which looks like the old 5 * TEMPORARY stub for calling LoadFirmware() which looks like the old
6 * VerifyFirmwareDriver_f() call. 6 * VerifyFirmwareDriver_f() call.
7 * (Firmware portion) 7 * (Firmware portion)
8 */ 8 */
9 9
10 #include "load_firmware_fw.h" 10 #include "load_firmware_fw.h"
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 ci.firmwareB_size = 0; 76 ci.firmwareB_size = 0;
77 77
78 /* Set up the params for LoadFirmware() */ 78 /* Set up the params for LoadFirmware() */
79 LoadFirmwareParams p; 79 LoadFirmwareParams p;
80 p.caller_internal = &ci; 80 p.caller_internal = &ci;
81 p.firmware_root_key_blob = root_key_blob; 81 p.firmware_root_key_blob = root_key_blob;
82 p.verification_block_0 = verification_headerA; 82 p.verification_block_0 = verification_headerA;
83 p.verification_block_1 = verification_headerB; 83 p.verification_block_1 = verification_headerB;
84 84
85 /* Allocate a key blob buffer */ 85 /* Allocate a key blob buffer */
86 p.kernel_sign_key_blob = Malloc(LOAD_FIRMWARE_KEY_BLOB_MAX); 86 p.kernel_sign_key_blob = Malloc(LOAD_FIRMWARE_KEY_BLOB_REC_SIZE);
87 p.kernel_sign_key_size = LOAD_FIRMWARE_KEY_BLOB_MAX; 87 p.kernel_sign_key_size = LOAD_FIRMWARE_KEY_BLOB_REC_SIZE;
88 88
89 /* Call LoadFirmware() */ 89 /* Call LoadFirmware() */
90 rv = LoadFirmware(&p); 90 rv = LoadFirmware(&p);
91 if (LOAD_FIRMWARE_SUCCESS == rv) { 91 if (LOAD_FIRMWARE_SUCCESS == rv) {
92 /* TODO: YOU NEED TO KEEP TRACK OF p.kernel_sign_key_blob AND 92 /* TODO: YOU NEED TO KEEP TRACK OF p.kernel_sign_key_blob AND
93 * p.kernel_sign_key_size SO YOU CAN PASS THEM TO LoadKernel(). */ 93 * p.kernel_sign_key_size SO YOU CAN PASS THEM TO LoadKernel(). */
94 94
95 return (0 == p.firmware_index ? BOOT_FIRMWARE_A_CONTINUE : 95 return (0 == p.firmware_index ? BOOT_FIRMWARE_A_CONTINUE :
96 BOOT_FIRMWARE_B_CONTINUE); 96 BOOT_FIRMWARE_B_CONTINUE);
97 97
98 } else { 98 } else {
99 /* Error */ 99 /* Error */
100 return BOOT_FIRMWARE_RECOVERY_CONTINUE; 100 return BOOT_FIRMWARE_RECOVERY_CONTINUE;
101 } 101 }
102 } 102 }
OLDNEW
« no previous file with comments | « vboot_firmware/lib/include/vboot_struct.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698