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 * 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 |
12 #include "sysincludes.h" | 12 #include "sysincludes.h" |
13 | 13 |
14 PACK_START /* Support packing for MSVC */ | 14 #ifdef _MSC_VER |
| 15 #pragma pack(push, 1) /* Support packing for MSVC. */ |
| 16 #endif |
15 | 17 |
16 /* Public key data */ | 18 /* Public key data */ |
17 typedef struct VbPublicKey { | 19 typedef struct VbPublicKey { |
18 uint64_t key_offset; /* Offset of key data from start of this struct */ | 20 uint64_t key_offset; /* Offset of key data from start of this struct */ |
19 uint64_t key_size; /* Size of key data in bytes (NOT strength of key | 21 uint64_t key_size; /* Size of key data in bytes (NOT strength of key |
20 * in bits) */ | 22 * in bits) */ |
21 uint64_t algorithm; /* Signature algorithm used by the key */ | 23 uint64_t algorithm; /* Signature algorithm used by the key */ |
22 uint64_t key_version; /* Key version */ | 24 uint64_t key_version; /* Key version */ |
23 } __attribute__((packed)) VbPublicKey; | 25 } __attribute__((packed)) VbPublicKey; |
24 | 26 |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
124 VbSignature body_signature; /* Signature for the kernel body */ | 126 VbSignature body_signature; /* Signature for the kernel body */ |
125 } __attribute__((packed)) VbKernelPreambleHeader; | 127 } __attribute__((packed)) VbKernelPreambleHeader; |
126 /* This should be followed by: | 128 /* This should be followed by: |
127 * 2) The signature data for the kernel body, pointed to by | 129 * 2) The signature data for the kernel body, pointed to by |
128 * body_signature.sig_offset. | 130 * body_signature.sig_offset. |
129 * 3) The signature data for (VBFirmwarePreambleHeader + body signature | 131 * 3) The signature data for (VBFirmwarePreambleHeader + body signature |
130 * data), pointed to by preamble_signature.sig_offset. */ | 132 * data), pointed to by preamble_signature.sig_offset. */ |
131 | 133 |
132 #define EXPECTED_VBKERNELPREAMBLEHEADER_SIZE 96 | 134 #define EXPECTED_VBKERNELPREAMBLEHEADER_SIZE 96 |
133 | 135 |
134 | 136 #ifdef _MSC_VER |
135 PACK_STOP /* Support packing for MSVC */ | 137 #pragma pack(pop) /* Support packing for MSVC. */ |
| 138 #endif |
136 | 139 |
137 #endif /* VBOOT_REFERENCE_VBOOT_STRUCT_H_ */ | 140 #endif /* VBOOT_REFERENCE_VBOOT_STRUCT_H_ */ |
OLD | NEW |