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

Side by Side Diff: lib/chromeos/load_util.c

Issue 6628009: Add a wrapper function of LoadKernel() (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/u-boot-next.git@chromeos-v2010.09
Patch Set: Fix return value 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 | « lib/chromeos/Makefile ('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
(Empty)
1 /*
2 * Copyright (c) 2011 The Chromium OS Authors. All rights reserved.
3 * Use of this source code is governed by a BSD-style license that can be
4 * found in the LICENSE file.
5 *
6 * Alternatively, this software may be distributed under the terms of the
7 * GNU General Public License ("GPL") version 2 as published by the Free
8 * Software Foundation.
9 */
10
11 #include <common.h>
12 #include <chromeos/load_util.h>
13
14 #define PREFIX "load_kernel: "
15
16 int load_kernel(LoadKernelParams *params, uint8_t *kernel_sign_key_blob,
sjg 2011/03/06 21:34:09 It's not great having load_kernel() and LoadKernel
Che-Liang Chiou 2011/03/07 05:06:52 I think you are right. I was thinking that this fu
17 void *kernel_buffer, uint64_t kernel_buffer_size,
sjg 2011/03/06 21:34:09 Why void* rather than char*? If an address perhaps
Che-Liang Chiou 2011/03/07 05:06:52 I am not sure if I am making the right choice here
18 uint64_t boot_flags)
19 {
20 block_dev_desc_t *dev_desc;
21
22 dev_desc = get_bootdev();
23 if (!dev_desc) {
24 debug(PREFIX "get_bootdev fail\n");
25 return LOAD_KERNEL_NOT_FOUND;
26 }
27
28 params->header_sign_key_blob = kernel_sign_key_blob;
29
30 params->bytes_per_lba = (uint64_t) dev_desc->blksz;
31 params->ending_lba = (uint64_t) get_limit() - 1;
32
33 params->kernel_buffer = kernel_buffer;
34 params->kernel_buffer_size = kernel_buffer_size;
35
36 params->boot_flags = boot_flags;
37
38 return LoadKernel(params);
39 }
OLDNEW
« no previous file with comments | « lib/chromeos/Makefile ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698