OLD | NEW |
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 Loading... |
31 * 1 = developer mode */ | 31 * 1 = developer mode */ |
32 | 32 |
33 /* Outputs from LoadKernel(); valid only if LoadKernel() returns | 33 /* Outputs from LoadKernel(); valid only if LoadKernel() returns |
34 * LOAD_KERNEL_SUCCESS */ | 34 * LOAD_KERNEL_SUCCESS */ |
35 uint64_t partition_number; /* Partition number to boot on current device | 35 uint64_t partition_number; /* Partition number to boot on current device |
36 * (1...M) */ | 36 * (1...M) */ |
37 void *bootloader_start; /* Start of bootloader image */ | 37 void *bootloader_start; /* Start of bootloader image */ |
38 uint64_t bootloader_size; /* Size of bootloader image in bytes */ | 38 uint64_t bootloader_size; /* Size of bootloader image in bytes */ |
39 } LoadKernelParams; | 39 } LoadKernelParams; |
40 | 40 |
41 uintn_t LoadKernel(LoadKernelParams* params); | 41 uint64_t LoadKernel(LoadKernelParams* params); |
42 /* Attempts to load the kernel from the current device. | 42 /* Attempts to load the kernel from the current device. |
43 * | 43 * |
44 * Returns LOAD_KERNEL_SUCCESS if successful, error code on failure. */ | 44 * Returns LOAD_KERNEL_SUCCESS if successful, error code on failure. */ |
45 | 45 |
46 | 46 |
47 typedef struct KernelBootloaderOptions { | 47 typedef struct KernelBootloaderOptions { |
48 /* The bootloader is loaded using the EFI LoadImage() and StartImage() | 48 /* The bootloader is loaded using the EFI LoadImage() and StartImage() |
49 * calls. Pass this struct via loaded_image->load_options. */ | 49 * calls. Pass this struct via loaded_image->load_options. */ |
50 uint64_t drive_number; /* Drive number of boot device (0...N) */ | 50 uint64_t drive_number; /* Drive number of boot device (0...N) */ |
51 uint64_t partition_number; /* Partition number, as returned from | 51 uint64_t partition_number; /* Partition number, as returned from |
52 * LoadKernel() in | 52 * LoadKernel() in |
53 * LoadKernelParams.partition_number */ | 53 * LoadKernelParams.partition_number */ |
54 uint64_t original_address; /* Absolute bootloader start adddress, | 54 uint64_t original_address; /* Absolute bootloader start adddress, |
55 * as returned from LoadKernel() in | 55 * as returned from LoadKernel() in |
56 * LoadKernelParams.bootloader_start */ | 56 * LoadKernelParams.bootloader_start */ |
57 } KernelBootloaderOptions; | 57 } KernelBootloaderOptions; |
58 | 58 |
59 | 59 |
60 #endif /* VBOOT_REFERENCE_LOAD_KERNEL_FW_H_ */ | 60 #endif /* VBOOT_REFERENCE_LOAD_KERNEL_FW_H_ */ |
OLD | NEW |