OLD | NEW |
1 /* Copyright (c) 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 * Data structure definitions for verified boot, for on-disk / in-eeprom | 5 * Data structure definitions for verified boot, for on-disk / in-eeprom |
6 * data. | 6 * data. |
7 */ | 7 */ |
8 | 8 |
9 #ifndef VBOOT_REFERENCE_VBOOT_STRUCT_H_ | 9 #ifndef VBOOT_REFERENCE_VBOOT_STRUCT_H_ |
10 #define VBOOT_REFERENCE_VBOOT_STRUCT_H_ | 10 #define VBOOT_REFERENCE_VBOOT_STRUCT_H_ |
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
150 typedef struct VbSharedDataHeader { | 150 typedef struct VbSharedDataHeader { |
151 /* Fields present in version 1 */ | 151 /* Fields present in version 1 */ |
152 uint32_t struct_version; /* Version of this structure */ | 152 uint32_t struct_version; /* Version of this structure */ |
153 uint64_t struct_size; /* Size of this structure in bytes */ | 153 uint64_t struct_size; /* Size of this structure in bytes */ |
154 uint64_t data_size; /* Size of shared data buffer in bytes */ | 154 uint64_t data_size; /* Size of shared data buffer in bytes */ |
155 uint64_t data_used; /* Amount of shared data used so far */ | 155 uint64_t data_used; /* Amount of shared data used so far */ |
156 | 156 |
157 VbPublicKey kernel_subkey; /* Kernel subkey, from firmware */ | 157 VbPublicKey kernel_subkey; /* Kernel subkey, from firmware */ |
158 uint64_t kernel_subkey_data_offset; /* Offset of kernel subkey data from | 158 uint64_t kernel_subkey_data_offset; /* Offset of kernel subkey data from |
159 * start of this struct */ | 159 * start of this struct */ |
160 uint64_t kernel_subkey_data_size; /* Offset of kernel subkey data */ | 160 uint64_t kernel_subkey_data_size; /* Size of kernel subkey data */ |
161 | 161 |
162 uint64_t flags; /* Flags */ | 162 uint64_t flags; /* Flags */ |
163 | 163 |
| 164 /* Timer values from VbGetTimer(). Unused values are set to 0. If a |
| 165 * function is called mutiple times, these are the times from the |
| 166 * most recent call. */ |
| 167 uint64_t timer_load_firmware_start_enter; /* LoadFirmwareStart() - enter */ |
| 168 uint64_t timer_load_firmware_start_exit; /* LoadFirmwareStart() - exit */ |
| 169 uint64_t timer_load_firmware_enter; /* LoadFirmware() - enter */ |
| 170 uint64_t timer_load_firmware_exit; /* LoadFirmware() - exit */ |
| 171 uint64_t timer_load_kernel_enter; /* LoadKernel() - enter */ |
| 172 uint64_t timer_load_kernel_exit; /* LoadKernel() - exit */ |
| 173 |
164 /* After read-only firmware which uses version 1 is released, any additional | 174 /* After read-only firmware which uses version 1 is released, any additional |
165 * fields must be added below, and the struct version must be increased. | 175 * fields must be added below, and the struct version must be increased. |
166 * Before reading/writing those fields, make sure that the struct being | 176 * Before reading/writing those fields, make sure that the struct being |
167 * accessed is at least version 2. | 177 * accessed is at least version 2. |
168 * | 178 * |
169 * It's always ok for an older firmware to access a newer struct, since all | 179 * It's always ok for an older firmware to access a newer struct, since all |
170 * the fields it knows about are present. Newer firmware needs to use | 180 * the fields it knows about are present. Newer firmware needs to use |
171 * reasonable defaults when accessing older structs. */ | 181 * reasonable defaults when accessing older structs. */ |
172 | 182 |
173 } __attribute__((packed)) VbSharedDataHeader; | 183 } __attribute__((packed)) VbSharedDataHeader; |
174 | 184 |
175 #define VB_SHARED_DATA_VERSION 1 /* Version for struct_version */ | 185 #define VB_SHARED_DATA_VERSION 1 /* Version for struct_version */ |
176 | 186 |
177 __pragma(pack(pop)) /* Support packing for MSVC. */ | 187 __pragma(pack(pop)) /* Support packing for MSVC. */ |
178 | 188 |
179 #endif /* VBOOT_REFERENCE_VBOOT_STRUCT_H_ */ | 189 #endif /* VBOOT_REFERENCE_VBOOT_STRUCT_H_ */ |
OLD | NEW |