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

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

Issue 2866006: Move old vkernel code out of vboot_firmware. (Closed) Base URL: ssh://gitrw.chromium.org/vboot_reference.git
Patch Set: 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_kernel.h ('k') | vboot_firmware/linktest/main.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) 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 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 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 return 1; 99 return 1;
100 } 100 }
101 Free(gptdata->secondary_header); 101 Free(gptdata->secondary_header);
102 } 102 }
103 103
104 /* Success */ 104 /* Success */
105 return 0; 105 return 0;
106 } 106 }
107 107
108 108
109 int LoadKernel2(LoadKernelParams* params) { 109 int LoadKernel(LoadKernelParams* params) {
110 110
111 VbPublicKey* kernel_subkey = (VbPublicKey*)params->header_sign_key_blob; 111 VbPublicKey* kernel_subkey = (VbPublicKey*)params->header_sign_key_blob;
112 112
113 GptData gpt; 113 GptData gpt;
114 uint64_t part_start, part_size; 114 uint64_t part_start, part_size;
115 uint64_t blba = params->bytes_per_lba; 115 uint64_t blba = params->bytes_per_lba;
116 uint64_t kbuf_sectors = KBUF_SIZE / blba; 116 uint64_t kbuf_sectors = KBUF_SIZE / blba;
117 uint8_t* kbuf = NULL; 117 uint8_t* kbuf = NULL;
118 int found_partitions = 0; 118 int found_partitions = 0;
119 int good_partition = -1; 119 int good_partition = -1;
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after
371 /* Success! */ 371 /* Success! */
372 return LOAD_KERNEL_SUCCESS; 372 return LOAD_KERNEL_SUCCESS;
373 } 373 }
374 374
375 // Handle error cases 375 // Handle error cases
376 if (found_partitions) 376 if (found_partitions)
377 return LOAD_KERNEL_INVALID; 377 return LOAD_KERNEL_INVALID;
378 else 378 else
379 return LOAD_KERNEL_NOT_FOUND; 379 return LOAD_KERNEL_NOT_FOUND;
380 } 380 }
OLDNEW
« no previous file with comments | « vboot_firmware/lib/include/vboot_kernel.h ('k') | vboot_firmware/linktest/main.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698