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

Side by Side Diff: utility/load_firmware_test.c

Issue 6597018: Add LoadFirmware() support for NvStorage API (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/stub/load_firmware_stub.c ('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) 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 * Routines for verifying a firmware image's signature. 5 * Routines for verifying a firmware image's signature.
6 */ 6 */
7 7
8 #include <stdio.h> 8 #include <stdio.h>
9 9
10 #include "fmap.h" 10 #include "fmap.h"
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 218
219 /* Convert status returned by LoadFirmware to string. Return NULL on error. */ 219 /* Convert status returned by LoadFirmware to string. Return NULL on error. */
220 const char* status_string(int status) { 220 const char* status_string(int status) {
221 switch (status) { 221 switch (status) {
222 case LOAD_FIRMWARE_SUCCESS: 222 case LOAD_FIRMWARE_SUCCESS:
223 return "LOAD_FIRMWARE_SUCCESS"; 223 return "LOAD_FIRMWARE_SUCCESS";
224 case LOAD_FIRMWARE_RECOVERY: 224 case LOAD_FIRMWARE_RECOVERY:
225 return "LOAD_FIRMWARE_RECOVERY"; 225 return "LOAD_FIRMWARE_RECOVERY";
226 case LOAD_FIRMWARE_REBOOT: 226 case LOAD_FIRMWARE_REBOOT:
227 return "LOAD_FIRMWARE_REBOOT"; 227 return "LOAD_FIRMWARE_REBOOT";
228 case LOAD_FIRMWARE_RECOVERY_TPM:
229 return "LOAD_FIRMWARE_RECOVERY_TPM";
230 default: 228 default:
231 return NULL; 229 return NULL;
232 } 230 }
233 } 231 }
234 232
235 int main(int argc, char* argv[]) { 233 int main(int argc, char* argv[]) {
236 int retval = 0; 234 int retval = 0;
237 const void* base_of_rom; 235 const void* base_of_rom;
238 const void* fmap; 236 const void* fmap;
239 uint64_t rom_size; 237 uint64_t rom_size;
(...skipping 16 matching lines...) Expand all
256 printf("opened %s\n", image_path); 254 printf("opened %s\n", image_path);
257 255
258 fmap = FmapFind((char*) base_of_rom, rom_size); 256 fmap = FmapFind((char*) base_of_rom, rom_size);
259 257
260 retval = DriveLoadFirmware(base_of_rom, fmap); 258 retval = DriveLoadFirmware(base_of_rom, fmap);
261 259
262 Free((void*) base_of_rom); 260 Free((void*) base_of_rom);
263 261
264 return retval; 262 return retval;
265 } 263 }
OLDNEW
« no previous file with comments | « firmware/stub/load_firmware_stub.c ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698