Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* Copyright (c) 2010-2011 The Chromium OS Authors. All rights reserved. | 1 /* Copyright (c) 2011 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_ |
| 11 | 11 |
| (...skipping 15 matching lines...) Expand all Loading... | |
| 27 #define BOOT_FLAG_DEVELOPER UINT64_C(0x01) | 27 #define BOOT_FLAG_DEVELOPER UINT64_C(0x01) |
| 28 /* In recovery mode */ | 28 /* In recovery mode */ |
| 29 #define BOOT_FLAG_RECOVERY UINT64_C(0x02) | 29 #define BOOT_FLAG_RECOVERY UINT64_C(0x02) |
| 30 /* Skip check of kernel buffer address */ | 30 /* Skip check of kernel buffer address */ |
| 31 #define BOOT_FLAG_SKIP_ADDR_CHECK UINT64_C(0x04) | 31 #define BOOT_FLAG_SKIP_ADDR_CHECK UINT64_C(0x04) |
| 32 /* Active main firmware is developer-type, not normal-type or recovery-type. */ | 32 /* Active main firmware is developer-type, not normal-type or recovery-type. */ |
| 33 #define BOOT_FLAG_DEV_FIRMWARE UINT64_C(0x08) | 33 #define BOOT_FLAG_DEV_FIRMWARE UINT64_C(0x08) |
| 34 | 34 |
| 35 typedef struct LoadKernelParams { | 35 typedef struct LoadKernelParams { |
| 36 /* Inputs to LoadKernel() */ | 36 /* Inputs to LoadKernel() */ |
| 37 void* header_sign_key_blob; /* Key blob used to sign the kernel header */ | 37 void* shared_data_blob; /* Buffer for data shared between |
| 38 * LoadFirmware() and LoadKernel(). Pass the | |
| 39 * same buffer which was passed to | |
| 40 * LoadFirmware(). */ | |
| 41 uint64_t shared_data_size; /* Size of shared data blob buffer, in bytes. | |
| 42 * On output, this will contain the actual | |
|
Bill Richardson
2011/03/09 20:52:20
Isn't shared_data_size an input only? Don't we get
Randall Spangler
2011/03/09 21:11:35
In recovery mode, LoadKernel() will still use the
| |
| 43 * data size placed into the buffer. */ | |
| 44 void* gbb_data; /* Pointer to GBB data */ | |
| 45 uint64_t gbb_size; /* Size of GBB data in bytes */ | |
| 38 uint64_t bytes_per_lba; /* Bytes per lba sector on current device */ | 46 uint64_t bytes_per_lba; /* Bytes per lba sector on current device */ |
| 39 uint64_t ending_lba; /* Last addressable lba sector on current | 47 uint64_t ending_lba; /* Last addressable lba sector on current |
| 40 * device */ | 48 * device */ |
| 41 void* kernel_buffer; /* Destination buffer for kernel | 49 void* kernel_buffer; /* Destination buffer for kernel |
| 42 * (normally at 0x100000) */ | 50 * (normally at 0x100000) */ |
| 43 uint64_t kernel_buffer_size; /* Size of kernel buffer in bytes */ | 51 uint64_t kernel_buffer_size; /* Size of kernel buffer in bytes */ |
| 44 uint64_t boot_flags; /* Boot flags */ | 52 uint64_t boot_flags; /* Boot flags */ |
| 45 VbNvContext* nv_context; /* Context for NV storage. nv_context->raw | 53 VbNvContext* nv_context; /* Context for NV storage. nv_context->raw |
| 46 * must be filled before calling | 54 * must be filled before calling |
| 47 * LoadKernel(). On output, check | 55 * LoadKernel(). On output, check |
| (...skipping 24 matching lines...) Expand all Loading... | |
| 72 * LoadKernel() in | 80 * LoadKernel() in |
| 73 * LoadKernelParams.partition_number */ | 81 * LoadKernelParams.partition_number */ |
| 74 uint64_t original_address; /* Absolute bootloader start adddress, | 82 uint64_t original_address; /* Absolute bootloader start adddress, |
| 75 * as returned from LoadKernel() in | 83 * as returned from LoadKernel() in |
| 76 * LoadKernelParams.bootloader_start */ | 84 * LoadKernelParams.bootloader_start */ |
| 77 uint8_t partition_guid[16]; /* UniquePartitionGuid for boot partition */ | 85 uint8_t partition_guid[16]; /* UniquePartitionGuid for boot partition */ |
| 78 } KernelBootloaderOptions; | 86 } KernelBootloaderOptions; |
| 79 | 87 |
| 80 | 88 |
| 81 #endif /* VBOOT_REFERENCE_LOAD_KERNEL_FW_H_ */ | 89 #endif /* VBOOT_REFERENCE_LOAD_KERNEL_FW_H_ */ |
| OLD | NEW |