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

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

Issue 2165003: Load kernel APIs added (once more, from the correct repo) (Closed) Base URL: ssh://gitrw.chromium.org/chromiumos
Patch Set: Created 10 years, 7 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 | « src/platform/vboot_reference/common/include/boot_device.h ('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 /* 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
3 * found in the LICENSE file.
4 *
5 * High-level firmware API for loading and verifying kernel.
6 * (Firmware Portion)
7 */
8
9 #ifndef VBOOT_REFERENCE_LOAD_KERNEL_FW_H_
10 #define VBOOT_REFERENCE_LOAD_KERNEL_FW_H_
11
12 #include <stdint.h>
13
14 /* Interface provided by verified boot library to BDS */
15
16 /* Return codes for LoadKernel() */
17 #define LOAD_KERNEL_SUCCESS 0
18 #define LOAD_KERNEL_NOT_FOUND 1
19 #define LOAD_KERNEL_INVALID 2
20
21 typedef struct LoadKernelParams {
22 /* Inputs to LoadKernel() */
23 uint64_t bytes_per_lba; /* Bytes per lba sector on current device */
24 uint64_t ending_lba; /* Last addressable lba sector on current
25 * device */
26 void *kernel_buffer; /* Destination buffer for kernel
27 * (normally at 0x100000) */
28 uint64_t kernel_buffer_size; /* Size of kernel buffer in bytes */
29 uint8_t in_developer_mode; /* Did device boot in developer mode?
30 * 0 = normal or recovery mode
31 * 1 = developer mode */
32
33 /* Outputs from LoadKernel(); valid only if LoadKernel() returns
34 * LOAD_KERNEL_SUCCESS */
35 uint64_t partition_number; /* Partition number to boot on current device
36 * (1...M) */
37 void *bootloader_start; /* Start of bootloader image */
38 uint64_t bootloader_size; /* Size of bootloader image in bytes */
39 } LoadKernelParams;
40
41 uintn_t LoadKernel(LoadKernelParams* params);
42 /* Attempts to load the kernel from the current device.
43 *
44 * Returns LOAD_KERNEL_SUCCESS if successful, error code on failure. */
45
46
47 typedef struct KernelBootloaderOptions {
48 /* The bootloader is loaded using the EFI LoadImage() and StartImage()
49 * calls. Pass this struct via loaded_image->load_options. */
50 uint64_t drive_number; /* Drive number of boot device (0...N) */
51 uint64_t partition_number; /* Partition number, as returned from
52 * LoadKernel() in
53 * LoadKernelParams.partition_number */
54 uint64_t original_address; /* Absolute bootloader start adddress,
55 * as returned from LoadKernel() in
56 * LoadKernelParams.bootloader_start */
57 } KernelBootloaderOptions;
58
59
60 #endif /* VBOOT_REFERENCE_LOAD_KERNEL_FW_H_ */
OLDNEW
« no previous file with comments | « src/platform/vboot_reference/common/include/boot_device.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698