Chromium Code Reviews| OLD | NEW |
|---|---|
| (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 } | |
| OLD | NEW |