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

Side by Side Diff: src/platform/vboot_reference/vboot_firmware/include/load_kernel_fw.h

Issue 2561001: Fix LoadKernel() (Closed) Base URL: ssh://gitrw.chromium.org/chromiumos
Patch Set: Make requested changes. Rename bootloader start to bootloader address. 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
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 * High-level firmware API for loading and verifying kernel. 5 * High-level firmware API for loading and verifying kernel.
6 * (Firmware Portion) 6 * (Firmware Portion)
7 */ 7 */
8 8
9 #ifndef VBOOT_REFERENCE_LOAD_KERNEL_FW_H_ 9 #ifndef VBOOT_REFERENCE_LOAD_KERNEL_FW_H_
10 #define VBOOT_REFERENCE_LOAD_KERNEL_FW_H_ 10 #define VBOOT_REFERENCE_LOAD_KERNEL_FW_H_
(...skipping 20 matching lines...) Expand all
31 * device */ 31 * device */
32 void *kernel_buffer; /* Destination buffer for kernel 32 void *kernel_buffer; /* Destination buffer for kernel
33 * (normally at 0x100000) */ 33 * (normally at 0x100000) */
34 uint64_t kernel_buffer_size; /* Size of kernel buffer in bytes */ 34 uint64_t kernel_buffer_size; /* Size of kernel buffer in bytes */
35 uint8_t boot_mode; /* Boot mode */ 35 uint8_t boot_mode; /* Boot mode */
36 36
37 /* Outputs from LoadKernel(); valid only if LoadKernel() returns 37 /* Outputs from LoadKernel(); valid only if LoadKernel() returns
38 * LOAD_KERNEL_SUCCESS */ 38 * LOAD_KERNEL_SUCCESS */
39 uint64_t partition_number; /* Partition number to boot on current device 39 uint64_t partition_number; /* Partition number to boot on current device
40 * (1...M) */ 40 * (1...M) */
41 void *bootloader_start; /* Start of bootloader image */ 41 uint64_t bootloader_address; /* Address of bootloader image in RAM */
42 uint64_t bootloader_size; /* Size of bootloader image in bytes */ 42 uint64_t bootloader_size; /* Size of bootloader image in bytes */
43 } LoadKernelParams; 43 } LoadKernelParams;
44 44
45 int LoadKernel(LoadKernelParams* params); 45 int LoadKernel(LoadKernelParams* params);
46 /* Attempts to load the kernel from the current device. 46 /* Attempts to load the kernel from the current device.
47 * 47 *
48 * Returns LOAD_KERNEL_SUCCESS if successful, error code on failure. */ 48 * Returns LOAD_KERNEL_SUCCESS if successful, error code on failure. */
49 49
50 50
51 typedef struct KernelBootloaderOptions { 51 typedef struct KernelBootloaderOptions {
52 /* The bootloader is loaded using the EFI LoadImage() and StartImage() 52 /* The bootloader is loaded using the EFI LoadImage() and StartImage()
53 * calls. Pass this struct via loaded_image->load_options. */ 53 * calls. Pass this struct via loaded_image->load_options. */
54 uint64_t drive_number; /* Drive number of boot device (0...N) */ 54 uint64_t drive_number; /* Drive number of boot device (0...N) */
55 uint64_t partition_number; /* Partition number, as returned from 55 uint64_t partition_number; /* Partition number, as returned from
56 * LoadKernel() in 56 * LoadKernel() in
57 * LoadKernelParams.partition_number */ 57 * LoadKernelParams.partition_number */
58 uint64_t original_address; /* Absolute bootloader start adddress, 58 uint64_t original_address; /* Absolute bootloader start adddress,
59 * as returned from LoadKernel() in 59 * as returned from LoadKernel() in
60 * LoadKernelParams.bootloader_start */ 60 * LoadKernelParams.bootloader_start */
61 } KernelBootloaderOptions; 61 } KernelBootloaderOptions;
62 62
63 63
64 #endif /* VBOOT_REFERENCE_LOAD_KERNEL_FW_H_ */ 64 #endif /* VBOOT_REFERENCE_LOAD_KERNEL_FW_H_ */
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698