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 * 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_ |
11 | 11 |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
124 VbSignature body_signature; /* Signature for the kernel body */ | 124 VbSignature body_signature; /* Signature for the kernel body */ |
125 } __attribute__((packed)) VbKernelPreambleHeader; | 125 } __attribute__((packed)) VbKernelPreambleHeader; |
126 /* This should be followed by: | 126 /* This should be followed by: |
127 * 2) The signature data for the kernel body, pointed to by | 127 * 2) The signature data for the kernel body, pointed to by |
128 * body_signature.sig_offset. | 128 * body_signature.sig_offset. |
129 * 3) The signature data for (VBFirmwarePreambleHeader + body signature | 129 * 3) The signature data for (VBFirmwarePreambleHeader + body signature |
130 * data), pointed to by preamble_signature.sig_offset. */ | 130 * data), pointed to by preamble_signature.sig_offset. */ |
131 | 131 |
132 #define EXPECTED_VBKERNELPREAMBLEHEADER_SIZE 96 | 132 #define EXPECTED_VBKERNELPREAMBLEHEADER_SIZE 96 |
133 | 133 |
134 /* Data shared between LoadFirmware() and LoadKernel() */ | |
135 typedef struct VbSharedDataHeader { | |
136 /* Fields present in version 1 */ | |
137 uint32_t struct_version; /* Version of this structure */ | |
138 uint64_t struct_size; /* Size of this structure in bytes */ | |
139 uint64_t data_size; /* Size of shared data buffer in bytes */ | |
Bill Richardson
2011/03/09 20:52:20
So the idea is that a single big blob of memory is
Randall Spangler
2011/03/09 21:11:35
Done.
| |
140 uint64_t data_used; /* Amount of shared data used */ | |
141 | |
142 VbPublicKey kernel_subkey; /* Kernel subkey, from firmware */ | |
143 uint64_t kernel_subkey_data_offset; /* Offset of kernel subkey data from | |
144 * start of this struct */ | |
145 uint64_t kernel_subkey_data_size; /* Offset of kernel subkey data */ | |
146 | |
147 uint64_t flags; /* Flags */ | |
148 | |
149 /* After read-only firmware which uses version 1 is released, any additional | |
150 * fields must be added below, and the struct version must be increased. | |
151 * Before reading/writing those fields, make sure that the struct being | |
152 * accessed is at least version 2. | |
153 * | |
154 * It's always ok for an older firmware to access a newer struct, since all | |
155 * the fields it knows about are present. Newer firmware needs to use | |
156 * reasonable defaults when accessing older structs. */ | |
157 | |
158 } __attribute__((packed)) VbSharedDataHeader; | |
159 | |
160 #define VB_SHARED_DATA_VERSION 1 /* Version for struct_version */ | |
161 | |
134 __pragma(pack(pop)) /* Support packing for MSVC. */ | 162 __pragma(pack(pop)) /* Support packing for MSVC. */ |
135 | 163 |
136 #endif /* VBOOT_REFERENCE_VBOOT_STRUCT_H_ */ | 164 #endif /* VBOOT_REFERENCE_VBOOT_STRUCT_H_ */ |
OLD | NEW |