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 * Defines EFI related structure. See more details in EFI 2.3 spec. | 5 * Defines EFI related structure. See more details in EFI 2.3 spec. |
6 * | 6 * |
7 * To download EFI standard, please visit UEFI homepage: | 7 * To download EFI standard, please visit UEFI homepage: |
8 * http://www.uefi.org/ | 8 * http://www.uefi.org/ |
9 */ | 9 */ |
10 #ifndef VBOOT_REFERENCE_CGPTLIB_GPT_H_ | 10 #ifndef VBOOT_REFERENCE_CGPTLIB_GPT_H_ |
11 #define VBOOT_REFERENCE_CGPTLIB_GPT_H_ | 11 #define VBOOT_REFERENCE_CGPTLIB_GPT_H_ |
12 | 12 |
13 #include "sysincludes.h" | 13 #include "sysincludes.h" |
14 | 14 |
15 #ifdef _MSC_VER | 15 __pragma(pack(push,1)) /* Support packing for MSVC. */ |
16 #pragma pack(push,1) /* Support packing for MSVC. */ | |
17 #endif | |
18 | 16 |
19 #define GPT_HEADER_SIGNATURE "EFI PART" | 17 #define GPT_HEADER_SIGNATURE "EFI PART" |
20 #define GPT_HEADER_SIGNATURE_SIZE sizeof(GPT_HEADER_SIGNATURE) | 18 #define GPT_HEADER_SIGNATURE_SIZE sizeof(GPT_HEADER_SIGNATURE) |
21 #define GPT_HEADER_REVISION 0x00010000 | 19 #define GPT_HEADER_REVISION 0x00010000 |
22 | 20 |
23 /* The first 3 numbers should be stored in network-endian format | 21 /* The first 3 numbers should be stored in network-endian format |
24 * according to the GUID RFC. The UEFI spec appendix A claims they | 22 * according to the GUID RFC. The UEFI spec appendix A claims they |
25 * should be stored in little-endian format. But they need to be | 23 * should be stored in little-endian format. But they need to be |
26 * _displayed_ in network-endian format, which is also how they're | 24 * _displayed_ in network-endian format, which is also how they're |
27 * documented in the specs. | 25 * documented in the specs. |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
110 uint16_t gpt_att; | 108 uint16_t gpt_att; |
111 } __attribute__((packed)) fields; | 109 } __attribute__((packed)) fields; |
112 uint64_t whole; | 110 uint64_t whole; |
113 } attrs; | 111 } attrs; |
114 uint16_t name[36]; /* UTF-16 encoded partition name */ | 112 uint16_t name[36]; /* UTF-16 encoded partition name */ |
115 /* Remainder of entry is reserved and should be 0 */ | 113 /* Remainder of entry is reserved and should be 0 */ |
116 } __attribute__((packed)) GptEntry; | 114 } __attribute__((packed)) GptEntry; |
117 | 115 |
118 #define GPTENTRY_EXPECTED_SIZE 128 | 116 #define GPTENTRY_EXPECTED_SIZE 128 |
119 | 117 |
120 #ifdef _MSC_VER | 118 __pragma(pack(pop)) /* Support packing for MSVC. */ |
121 #pragma pack(pop) /* Support packing for MSVC. */ | |
122 #endif | |
123 | 119 |
124 #endif /* VBOOT_REFERENCE_CGPTLIB_GPT_H_ */ | 120 #endif /* VBOOT_REFERENCE_CGPTLIB_GPT_H_ */ |
OLD | NEW |