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 * 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 Loading... |
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 } |
OLD | NEW |